Interface OSchema
- All Known Subinterfaces:
OSchemaObject
- All Known Implementing Classes:
OImmutableSchema,OSessionSchema,OSessionSchemaObject
public interface OSchema
-
Method Summary
Modifier and TypeMethodDescriptionintintcreateAbstractClass(String iClassName) createAbstractClass(String iClassName, OClass iSuperClass) createAbstractClass(String iClassName, OClass... superClasses) createClass(String iClassName) createClass(String className, int[] clusterIds, OClass... superClasses) createClass(String className, int clusters, OClass... superClasses) createClass(String iClassName, OClass iSuperClass) createClass(String iClassName, OClass... superClasses) createClass(String iClassName, OClass iSuperClass, int[] iClusterIds) booleancreateClassIfNotExists(String className) booleancreateClassIfNotExists(String iClassName, OClass... superClasses) createGlobalProperty(String name, OType type, Integer id) createView(ODatabaseDocumentInternal database, String viewName, String statement, Map<String, Object> metadata) createView(OViewConfig config) createView(OViewConfig config, ViewCreationListener listener) createView(String viewName, String statement) voidvoidbooleanexistsClass(String iClassName) booleanexistsView(String name) Returns the OClass instance by class name.getClassByClusterId(int clusterId) getClassesRelyOnCluster(String iClusterName) Returns all the classes that rely on a clustergetGlobalPropertyById(int id) getOrCreateClass(String iClassName) getOrCreateClass(String iClassName, OClass iSuperClass) getOrCreateClass(String iClassName, OClass... superClasses) intgetViewByClusterId(int clusterId) getViews()reload()
-
Method Details
-
countClasses
int countClasses() -
countViews
int countViews() -
createClass
-
createClass
-
createClass
-
createClass
-
createClass
-
createClass
-
createClassIfNotExists
-
createClassIfNotExists
-
createAbstractClass
-
createAbstractClass
-
createAbstractClass
-
dropClass
-
reload
OSchema reload() -
existsClass
-
getClass
-
getClass
Returns the OClass instance by class name.If the class is not configured and the database has an entity manager with the requested class as registered, then creates a schema class for it at the fly.
If the database nor the entity manager have not registered class with specified name, returns null.
- Parameters:
iClassName- Name of the class to retrieve- Returns:
- class instance or null if class with given name is not configured.
-
getOrCreateClass
-
getOrCreateClass
-
getOrCreateClass
-
getClasses
Collection<OClass> getClasses() -
getViews
Collection<OView> getViews() -
getView
-
createView
-
createView
-
createView
-
createView
-
existsView
-
dropView
-
getIdentity
ORID getIdentity() -
getClassesRelyOnCluster
Returns all the classes that rely on a cluster- Parameters:
iClusterName- Cluster name
-
getClassByClusterId
-
getViewByClusterId
-
getGlobalPropertyById
-
getGlobalProperties
List<OGlobalProperty> getGlobalProperties() -
createGlobalProperty
-
getClusterSelectionFactory
OClusterSelectionFactory getClusterSelectionFactory() -
makeSnapshot
OImmutableSchema makeSnapshot() -
getVersion
int getVersion()
-