Java API - OSchema
Provides an interface for operating on schemas in OrientDB.
Working with Schemas
In order to operate on schemas in your Java application, you first need to import it.
import com.orientechnologies.orient.core.db.OSchema;
Methods
Method | Return Type | Description |
---|---|---|
createClass() | int | Counts the number of classes associated with the schema |
createAbstractClass() | OClass | Creates an abstract class in the schema |
createClass() | OClass | Creates a class in the schema |
dropClass() | void | Removes a class from the schema |
existsClass() | boolean | Checks whether the class exists in the schema |
getClass() | OClass | Retrieves class from the schema |
getClassByClusterId() | OClass | Retrieves class by associated Cluster ID |
getClasses() | Set<OClass> | Retrieves all classes associated with schema |
getClassesRelyOnCluster() | Set<OClass> | Retrieves all classes associated with the given cluster |
getOrCreateClass() | OClass | Retrieves class from the schema and create the class if it does not already exist |