Class OSessionSchemaObject
java.lang.Object
com.orientechnologies.orient.object.metadata.schema.OSessionSchemaObject
- All Implemented Interfaces:
OSchema,OSchemaObject
- Author:
- Luca Molino (molino.luca--at--gmail.com)
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintintcreateAbstractClass(Class<?> iClass) createAbstractClass(String iClassName) createAbstractClass(String iClassName, OClass iSuperClass) createAbstractClass(String iClassName, OClass... superClasses) createClass(Class<?> clazz) 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 className, 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) protected static voidgenerateLinkProperty(ODatabaseDocument database, OClass schema, String field, OType t, Class<?> linkedClazz) protected static voidgenerateOClass(Class<?> iClass, ODatabaseDocument database) voidgenerateSchema(Class<?> iClass) Generate/updates the SchemaClass and properties from given Class<?voidgenerateSchema(Class<?> iClass, ODatabaseDocument database) Generate/updates the SchemaClass and properties from given Class<?voidgenerateSchema(String iPackageName) Scans all classes accessible from the context class loader which belong to the given package and subpackages.voidgenerateSchema(String iPackageName, ClassLoader iClassLoader) Scans all classes accessible from the context class loader which belong to the given package and subpackages.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()voidChecks if all registered entities has schema generated, if not it generates it
-
Field Details
-
underlying
-
-
Constructor Details
-
OSessionSchemaObject
-
-
Method Details
-
makeSnapshot
- Specified by:
makeSnapshotin interfaceOSchema
-
countClasses
public int countClasses()- Specified by:
countClassesin interfaceOSchema
-
countViews
public int countViews()- Specified by:
countViewsin interfaceOSchema
-
createClass
- Specified by:
createClassin interfaceOSchema
-
createClass
- Specified by:
createClassin interfaceOSchema
-
createClass
- Specified by:
createClassin interfaceOSchema
-
createClass
- Specified by:
createClassin interfaceOSchema
-
createClass
- Specified by:
createClassin interfaceOSchema
-
createAbstractClass
- Specified by:
createAbstractClassin interfaceOSchemaObject
-
createAbstractClass
- Specified by:
createAbstractClassin interfaceOSchema
-
createAbstractClass
- Specified by:
createAbstractClassin interfaceOSchema
-
createAbstractClass
- Specified by:
createAbstractClassin interfaceOSchema
-
dropClass
-
reload
-
existsClass
- Specified by:
existsClassin interfaceOSchema
-
existsView
- Specified by:
existsViewin interfaceOSchema
-
dropView
-
getClass
-
getClass
Description copied from interface:OSchemaReturns 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.
-
getOrCreateClass
- Specified by:
getOrCreateClassin interfaceOSchema
-
getOrCreateClass
- Specified by:
getOrCreateClassin interfaceOSchema
-
getOrCreateClass
- Specified by:
getOrCreateClassin interfaceOSchema
-
getGlobalPropertyById
- Specified by:
getGlobalPropertyByIdin interfaceOSchema
-
getClasses
- Specified by:
getClassesin interfaceOSchema
-
getViews
-
getView
-
createView
- Specified by:
createViewin interfaceOSchema
-
createView
public OView createView(ODatabaseDocumentInternal database, String viewName, String statement, Map<String, Object> metadata) - Specified by:
createViewin interfaceOSchema
-
createView
- Specified by:
createViewin interfaceOSchema
-
createView
- Specified by:
createViewin interfaceOSchema
-
getVersion
public int getVersion()- Specified by:
getVersionin interfaceOSchema
-
getIdentity
- Specified by:
getIdentityin interfaceOSchema
-
getClassesRelyOnCluster
Description copied from interface:OSchemaReturns all the classes that rely on a cluster- Specified by:
getClassesRelyOnClusterin interfaceOSchema- Parameters:
iClusterName- Cluster name
-
createClass
- Specified by:
createClassin interfaceOSchema
-
createClassIfNotExists
- Specified by:
createClassIfNotExistsin interfaceOSchema
-
createClassIfNotExists
- Specified by:
createClassIfNotExistsin interfaceOSchema
-
getUnderlying
-
getClassByClusterId
- Specified by:
getClassByClusterIdin interfaceOSchema
-
getViewByClusterId
- Specified by:
getViewByClusterIdin interfaceOSchema
-
getClusterSelectionFactory
- Specified by:
getClusterSelectionFactoryin interfaceOSchema
-
generateSchema
Scans all classes accessible from the context class loader which belong to the given package and subpackages.- Parameters:
iPackageName- The base package
-
generateSchema
Scans all classes accessible from the context class loader which belong to the given package and subpackages.- Parameters:
iPackageName- The base package
-
generateSchema
Generate/updates the SchemaClass and properties from given Class<?>.- Parameters:
iClass- :- the Class<?> to generate
-
generateSchema
Generate/updates the SchemaClass and properties from given Class<?>.- Parameters:
iClass- :- the Class<?> to generate
-
synchronizeSchema
public void synchronizeSchema()Checks if all registered entities has schema generated, if not it generates it -
generateOClass
-
generateLinkProperty
protected static void generateLinkProperty(ODatabaseDocument database, OClass schema, String field, OType t, Class<?> linkedClazz) -
getGlobalProperties
- Specified by:
getGlobalPropertiesin interfaceOSchema
-
createGlobalProperty
- Specified by:
createGlobalPropertyin interfaceOSchema
-
createClass
- Specified by:
createClassin interfaceOSchemaObject
-