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;


MethodReturn TypeDescription
createClass()intCounts the number of classes associated with the schema
createAbstractClass()OClassCreates an abstract class in the schema
createClass()OClassCreates a class in the schema
dropClass()voidRemoves a class from the schema
existsClass()booleanChecks whether the class exists in the schema
getClass()OClassRetrieves class from the schema
getClassByClusterId()OClassRetrieves 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()OClassRetrieves class from the schema and create the class if it does not already exist