Class OClassAbstractDelegate
java.lang.Object
com.orientechnologies.orient.core.metadata.schema.OClassAbstractDelegate
- All Implemented Interfaces:
OClass,Comparable<OClass>
Abstract Delegate for OClass interface.
- Author:
- Luca Garulli (l.garulli--(at)--orientdb.com) (http://orientdb.com)
-
Nested Class Summary
Nested classes/interfaces inherited from interface com.orientechnologies.orient.core.metadata.schema.OClass
OClass.ATTRIBUTES, OClass.INDEX_TYPE -
Field Summary
FieldsFields inherited from interface com.orientechnologies.orient.core.metadata.schema.OClass
EDGE_CLASS_NAME, VERTEX_CLASS_NAME -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaddCluster(String iClusterName) addClusterId(int iId) addSuperClass(OClass superClass) booleanareIndexed(String... fields) booleanareIndexed(Collection<String> fields) Indicates whether given fields are contained as first key fields in class indexes.voidintlongcount()Returns the number of the records of this class considering also subclasses (polymorphic).longcount(boolean iPolymorphic) Returns the number of the records of this class and based on polymorphic parameter it consider or not the subclasses.createIndex(String iName, OClass.INDEX_TYPE iType, OProgressListener iProgressListener, String... fields) Creates database index that is based on passed in field names.createIndex(String iName, OClass.INDEX_TYPE iType, String... fields) Creates database index that is based on passed in field names.createIndex(String iName, String iType, OProgressListener iProgressListener, ODocument metadata, String... fields) Creates database index that is based on passed in field names.createIndex(String iName, String iType, OProgressListener iProgressListener, ODocument metadata, String algorithm, String... fields) Creates database index that is based on passed in field names.createIndex(String iName, String iType, String... fields) Creates database index that is based on passed in field names.createProperty(String iPropertyName, OType iType) createProperty(String iPropertyName, OType iType, OClass iLinkedClass) createProperty(String iPropertyName, OType iType, OClass iLinkedClass, boolean unsafe) Create a property in the class with the specified options.createProperty(String iPropertyName, OType iType, OType iLinkedType) createProperty(String iPropertyName, OType iType, OType iLinkedType, boolean unsafe) Create a property in the class with the specified options.voiddropProperty(String iPropertyName) booleanbooleanexistsProperty(String iPropertyName) get(OClass.ATTRIBUTES iAttribute) Deprecated.Returns the auto sharding index configured for the class if any.Deprecated.getClassIndex(String iName) Returns index instance by database index name.voidgetClassIndexes(Collection<OIndex> indexes) Internal.getClassInvolvedIndexes(String... fields) getClassInvolvedIndexes(Collection<String> fields) Returns list of indexes that contain passed in fields names as their first keys.floatintint[]intvoidgetIndexes(Collection<OIndex> indexes) Internal.getInvolvedIndexes(String... fields) Returns list of indexes that contain passed in fields names as their first keys.getInvolvedIndexes(Collection<String> fields) Returns list of indexes that contain passed in fields names as their first keys.getName()floatReturns the oversize factor.int[]getProperty(String iPropertyName) longgetSize()Deprecated.booleanhasClusterId(int clusterId) inthashCode()booleanhasPolymorphicClusterId(int clusterId) booleanbooleanbooleanbooleanisSubClassOf(OClass iClass) Returns true if the current instance extends the passed schema class (iClass).booleanisSubClassOf(String iClassName) Tells if the current instance extends the passed schema class (iClass).booleanisSuperClassOf(OClass iClass) Returns true if the passed schema class (iClass) extends the current instance.removeClusterId(int iId) voidremoveCustom(String iName) removeSuperClass(OClass superClass) set(OClass.ATTRIBUTES attribute, Object iValue) setAbstract(boolean iAbstract) setClusterSelection(OClusterSelectionStrategy clusterSelection) setClusterSelection(String iStrategyName) voidsetDefaultClusterId(int iDefaultClusterId) setDescription(String iDescription) setOverSize(float overSize) Sets the oversize factor.setShortName(String shortName) setStrictMode(boolean iMode) setSuperClass(OClass iSuperClass) Deprecated.setSuperClasses(List<? extends OClass> classes) toString()voidtruncate()Truncates all the clusters the class uses.truncateCluster(String clusterName) Removes all data in the cluster with given name.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface com.orientechnologies.orient.core.metadata.schema.OClass
getAllocation, isEdgeType, isVertexType
-
Field Details
-
delegate
-
-
Constructor Details
-
OClassAbstractDelegate
-
-
Method Details
-
getAutoShardingIndex
Description copied from interface:OClassReturns the auto sharding index configured for the class if any.- Specified by:
getAutoShardingIndexin interfaceOClass
-
isStrictMode
public boolean isStrictMode()- Specified by:
isStrictModein interfaceOClass
-
isAbstract
public boolean isAbstract()- Specified by:
isAbstractin interfaceOClass
-
setAbstract
- Specified by:
setAbstractin interfaceOClass
-
setStrictMode
- Specified by:
setStrictModein interfaceOClass
-
getSuperClass
Deprecated.- Specified by:
getSuperClassin interfaceOClass
-
setSuperClass
Deprecated.- Specified by:
setSuperClassin interfaceOClass
-
getName
-
getSuperClasses
- Specified by:
getSuperClassesin interfaceOClass
-
hasSuperClasses
public boolean hasSuperClasses()- Specified by:
hasSuperClassesin interfaceOClass
-
setSuperClasses
- Specified by:
setSuperClassesin interfaceOClass
-
getSuperClassesNames
- Specified by:
getSuperClassesNamesin interfaceOClass
-
getIndexes
Description copied from interface:OClassInternal. All indexes for given class and its super classes.- Specified by:
getIndexesin interfaceOClass
-
addSuperClass
- Specified by:
addSuperClassin interfaceOClass
-
removeSuperClass
- Specified by:
removeSuperClassin interfaceOClass
-
setName
-
getStreamableName
- Specified by:
getStreamableNamein interfaceOClass
-
declaredProperties
- Specified by:
declaredPropertiesin interfaceOClass
-
properties
- Specified by:
propertiesin interfaceOClass
-
propertiesMap
- Specified by:
propertiesMapin interfaceOClass
-
getIndexedProperties
- Specified by:
getIndexedPropertiesin interfaceOClass
-
getProperty
- Specified by:
getPropertyin interfaceOClass
-
createProperty
- Specified by:
createPropertyin interfaceOClass
-
createProperty
- Specified by:
createPropertyin interfaceOClass
-
createProperty
public OProperty createProperty(String iPropertyName, OType iType, OClass iLinkedClass, boolean unsafe) Description copied from interface:OClassCreate a property in the class with the specified options.- Specified by:
createPropertyin interfaceOClass- Parameters:
iPropertyName- the name of the property.iType- the type of the property.iLinkedClass- in case of property of type LINK,LINKLIST,LINKSET,LINKMAP,EMBEDDED,EMBEDDEDLIST,EMBEDDEDSET,EMBEDDEDMAP can be specified a linked class in all the other cases should be nullunsafe- if true avoid to check the persistent data for compatibility, should be used only if all persistent data is compatible with the property- Returns:
- the created property.
-
createProperty
- Specified by:
createPropertyin interfaceOClass
-
createProperty
public OProperty createProperty(String iPropertyName, OType iType, OType iLinkedType, boolean unsafe) Description copied from interface:OClassCreate a property in the class with the specified options.- Specified by:
createPropertyin interfaceOClass- Parameters:
iPropertyName- the name of the property.iType- the type of the property.iLinkedType- in case of property of type EMBEDDEDLIST,EMBEDDEDSET,EMBEDDEDMAP can be specified a linked type in all the other cases should be nullunsafe- if true avoid to check the persistent data for compatibility, should be used only if all persistent data is compatible with the property- Returns:
- the created property.
-
dropProperty
- Specified by:
dropPropertyin interfaceOClass
-
existsProperty
- Specified by:
existsPropertyin interfaceOClass
-
getClusterForNewInstance
- Specified by:
getClusterForNewInstancein interfaceOClass
-
getDefaultClusterId
public int getDefaultClusterId()- Specified by:
getDefaultClusterIdin interfaceOClass
-
setDefaultClusterId
public void setDefaultClusterId(int iDefaultClusterId) - Specified by:
setDefaultClusterIdin interfaceOClass
-
getClusterIds
public int[] getClusterIds()- Specified by:
getClusterIdsin interfaceOClass
-
addClusterId
- Specified by:
addClusterIdin interfaceOClass
-
getClusterSelection
- Specified by:
getClusterSelectionin interfaceOClass
-
setClusterSelection
- Specified by:
setClusterSelectionin interfaceOClass
-
setClusterSelection
- Specified by:
setClusterSelectionin interfaceOClass
-
addCluster
- Specified by:
addClusterin interfaceOClass
-
truncateCluster
Removes all data in the cluster with given name. As result indexes for this class will be rebuilt.- Specified by:
truncateClusterin interfaceOClass- Parameters:
clusterName- Name of cluster to be truncated.- Returns:
- Instance of current object.
-
removeClusterId
- Specified by:
removeClusterIdin interfaceOClass
-
getPolymorphicClusterIds
public int[] getPolymorphicClusterIds()- Specified by:
getPolymorphicClusterIdsin interfaceOClass
-
getSubclasses
- Specified by:
getSubclassesin interfaceOClass- Returns:
- all the subclasses (one level hierarchy only)
-
getBaseClasses
Deprecated.- Specified by:
getBaseClassesin interfaceOClass
-
getAllSubclasses
- Specified by:
getAllSubclassesin interfaceOClass- Returns:
- all the subclass hierarchy
-
getAllSuperClasses
- Specified by:
getAllSuperClassesin interfaceOClass- Returns:
- all recursively collected super classes
-
getAllBaseClasses
Deprecated.- Specified by:
getAllBaseClassesin interfaceOClass
-
getSize
public long getSize() -
getOverSize
public float getOverSize()Description copied from interface:OClassReturns the oversize factor. Oversize is used to extend the record size by a factor to avoid defragmentation upon updates. 0 or 1.0 means no oversize.- Specified by:
getOverSizein interfaceOClass- Returns:
- Oversize factor
- See Also:
-
setOverSize
Description copied from interface:OClassSets the oversize factor. Oversize is used to extend the record size by a factor to avoid defragmentation upon updates. 0 or 1.0 means no oversize. Default is 0.- Specified by:
setOverSizein interfaceOClass- Returns:
- Oversize factor
- See Also:
-
count
public long count()Description copied from interface:OClassReturns the number of the records of this class considering also subclasses (polymorphic). -
count
public long count(boolean iPolymorphic) Description copied from interface:OClassReturns the number of the records of this class and based on polymorphic parameter it consider or not the subclasses. -
truncate
Description copied from interface:OClassTruncates all the clusters the class uses.- Specified by:
truncatein interfaceOClass- Throws:
IOException
-
isSubClassOf
Description copied from interface:OClassTells if the current instance extends the passed schema class (iClass).- Specified by:
isSubClassOfin interfaceOClass- Returns:
- true if the current instance extends the passed schema class (iClass).
- See Also:
-
isSubClassOf
Description copied from interface:OClassReturns true if the current instance extends the passed schema class (iClass).- Specified by:
isSubClassOfin interfaceOClass- Returns:
- true if the current instance extends the passed schema class (iClass).
- See Also:
-
isSuperClassOf
Description copied from interface:OClassReturns true if the passed schema class (iClass) extends the current instance.- Specified by:
isSuperClassOfin interfaceOClass- Returns:
- Returns true if the passed schema class extends the current instance.
- See Also:
-
getShortName
- Specified by:
getShortNamein interfaceOClass
-
setShortName
- Specified by:
setShortNamein interfaceOClass
-
getDescription
- Specified by:
getDescriptionin interfaceOClass
-
setDescription
- Specified by:
setDescriptionin interfaceOClass
-
get
-
set
-
createIndex
Description copied from interface:OClassCreates database index that is based on passed in field names. Given index will be added into class instance and associated with database index.- Specified by:
createIndexin interfaceOClass- Parameters:
iName- Database index nameiType- Index type.fields- Field names from which index will be created.- Returns:
- Class index registered inside of given class ans associated with database index.
-
createIndex
Description copied from interface:OClassCreates database index that is based on passed in field names. Given index will be added into class instance and associated with database index.- Specified by:
createIndexin interfaceOClass- Parameters:
iName- Database index nameiType- Index type.fields- Field names from which index will be created.- Returns:
- Class index registered inside of given class ans associated with database index.
-
createIndex
public OIndex createIndex(String iName, OClass.INDEX_TYPE iType, OProgressListener iProgressListener, String... fields) Description copied from interface:OClassCreates database index that is based on passed in field names. Given index will be added into class instance.- Specified by:
createIndexin interfaceOClass- Parameters:
iName- Database index name.iType- Index type.iProgressListener- Progress listener.fields- Field names from which index will be created.- Returns:
- Class index registered inside of given class ans associated with database index.
-
createIndex
public OIndex createIndex(String iName, String iType, OProgressListener iProgressListener, ODocument metadata, String algorithm, String... fields) Description copied from interface:OClassCreates database index that is based on passed in field names. Given index will be added into class instance.- Specified by:
createIndexin interfaceOClass- Parameters:
iName- Database index name.iType- Index type.iProgressListener- Progress listener.metadata- Additional parameters which will be added in index configuration document as "metadata" field.algorithm- Algorithm to use for indexing.fields- Field names from which index will be created. @return Class index registered inside of given class ans associated with database index.
-
createIndex
public OIndex createIndex(String iName, String iType, OProgressListener iProgressListener, ODocument metadata, String... fields) Description copied from interface:OClassCreates database index that is based on passed in field names. Given index will be added into class instance.- Specified by:
createIndexin interfaceOClass- Parameters:
iName- Database index name.iType- Index type.iProgressListener- Progress listener.metadata- Additional parameters which will be added in index configuration document as "metadata" field.fields- Field names from which index will be created. @return Class index registered inside of given class ans associated with database index.
-
getInvolvedIndexes
Description copied from interface:OClassReturns list of indexes that contain passed in fields names as their first keys. Order of fields does not matter.All indexes sorted by their count of parameters in ascending order. If there are indexes for the given set of fields in super class they will be taken into account.
- Specified by:
getInvolvedIndexesin interfaceOClass- Parameters:
fields- Field names.- Returns:
- list of indexes that contain passed in fields names as their first keys.
- See Also:
-
getInvolvedIndexes
Description copied from interface:OClassReturns list of indexes that contain passed in fields names as their first keys. Order of fields does not matter.All indexes sorted by their count of parameters in ascending order. If there are indexes for the given set of fields in super class they will be taken into account.
- Specified by:
getInvolvedIndexesin interfaceOClass- Parameters:
fields- Field names.- Returns:
- list of indexes that contain passed in fields names as their first keys.
- See Also:
-
getClassInvolvedIndexes
Description copied from interface:OClassReturns list of indexes that contain passed in fields names as their first keys. Order of fields does not matter.Indexes that related only to the given class will be returned.
- Specified by:
getClassInvolvedIndexesin interfaceOClass- Parameters:
fields- Field names.- Returns:
- list of indexes that contain passed in fields names as their first keys.
- See Also:
-
getClassInvolvedIndexes
- Specified by:
getClassInvolvedIndexesin interfaceOClass- Parameters:
fields- Field names.- Returns:
- list of indexes that contain passed in fields names as their first keys.
- See Also:
-
areIndexed
Description copied from interface:OClassIndicates whether given fields are contained as first key fields in class indexes. Order of fields does not matter. If there are indexes for the given set of fields in super class they will be taken into account.- Specified by:
areIndexedin interfaceOClass- Parameters:
fields- Field names.- Returns:
trueif given fields are contained as first key fields in class indexes.
-
areIndexed
- Specified by:
areIndexedin interfaceOClass- Parameters:
fields- Field names.- Returns:
trueif given fields are contained as first key fields in class indexes.- See Also:
-
getClassIndex
Description copied from interface:OClassReturns index instance by database index name.- Specified by:
getClassIndexin interfaceOClass- Parameters:
iName- Database index name.- Returns:
- Index instance.
-
getClassIndexes
- Specified by:
getClassIndexesin interfaceOClass- Returns:
- All indexes for given class, not the inherited ones.
-
getClassIndexes
Description copied from interface:OClassInternal. Copy all the indexes for given class, not the inherited ones, in the collection received as argument.- Specified by:
getClassIndexesin interfaceOClass
-
getIndexes
- Specified by:
getIndexesin interfaceOClass- Returns:
- All indexes for given class and its super classes.
-
getCustom
-
setCustom
-
removeCustom
- Specified by:
removeCustomin interfaceOClass
-
clearCustom
public void clearCustom()- Specified by:
clearCustomin interfaceOClass
-
getCustomKeys
- Specified by:
getCustomKeysin interfaceOClass
-
hasClusterId
public boolean hasClusterId(int clusterId) - Specified by:
hasClusterIdin interfaceOClass
-
hasPolymorphicClusterId
public boolean hasPolymorphicClusterId(int clusterId) - Specified by:
hasPolymorphicClusterIdin interfaceOClass
-
compareTo
- Specified by:
compareToin interfaceComparable<OClass>
-
getClassOverSize
public float getClassOverSize()- Specified by:
getClassOverSizein interfaceOClass
-
toString
-
equals
-
hashCode
public int hashCode() -
getDelegate
-