public abstract class OClassAbstractDelegate extends Object implements OClass
OClass.ATTRIBUTES, OClass.INDEX_TYPE
Modifier and Type | Field and Description |
---|---|
protected OClass |
delegate |
EDGE_CLASS_NAME, VERTEX_CLASS_NAME
Constructor and Description |
---|
OClassAbstractDelegate(OClass delegate) |
Modifier and Type | Method and Description |
---|---|
OClass |
addCluster(String iClusterName) |
OClass |
addClusterId(int iId) |
OClass |
addSuperClass(OClass superClass) |
boolean |
areIndexed(Collection<String> fields)
Indicates whether given fields are contained as first key fields in class indexes.
|
boolean |
areIndexed(String... fields) |
void |
clearCustom() |
int |
compareTo(OClass o) |
long |
count()
Returns the number of the records of this class considering also subclasses (polymorphic).
|
long |
count(boolean iPolymorphic)
Returns the number of the records of this class and based on polymorphic parameter it consider
or not the subclasses.
|
OIndex |
createIndex(String iName,
OClass.INDEX_TYPE iType,
OProgressListener iProgressListener,
String... fields)
Creates database index that is based on passed in field names.
|
OIndex |
createIndex(String iName,
OClass.INDEX_TYPE iType,
String... fields)
Creates database index that is based on passed in field names.
|
OIndex |
createIndex(String iName,
String iType,
OProgressListener iProgressListener,
ODocument metadata,
String... fields)
Creates database index that is based on passed in field names.
|
OIndex |
createIndex(String iName,
String iType,
OProgressListener iProgressListener,
ODocument metadata,
String algorithm,
String... fields)
Creates database index that is based on passed in field names.
|
OIndex |
createIndex(String iName,
String iType,
String... fields)
Creates database index that is based on passed in field names.
|
OProperty |
createProperty(String iPropertyName,
OType iType) |
OProperty |
createProperty(String iPropertyName,
OType iType,
OClass iLinkedClass) |
OProperty |
createProperty(String iPropertyName,
OType iType,
OClass iLinkedClass,
boolean unsafe)
Create a property in the class with the specified options.
|
OProperty |
createProperty(String iPropertyName,
OType iType,
OType iLinkedType) |
OProperty |
createProperty(String iPropertyName,
OType iType,
OType iLinkedType,
boolean unsafe)
Create a property in the class with the specified options.
|
Collection<OProperty> |
declaredProperties() |
void |
dropProperty(String iPropertyName) |
boolean |
equals(Object obj) |
boolean |
existsProperty(String iPropertyName) |
Object |
get(OClass.ATTRIBUTES iAttribute) |
Collection<OClass> |
getAllBaseClasses()
Deprecated.
|
Collection<OClass> |
getAllSubclasses() |
Collection<OClass> |
getAllSuperClasses() |
OIndex |
getAutoShardingIndex()
Returns the auto sharding index configured for the class if any.
|
Collection<OClass> |
getBaseClasses()
Deprecated.
|
OIndex |
getClassIndex(String iName)
Returns index instance by database index name.
|
Set<OIndex> |
getClassIndexes() |
void |
getClassIndexes(Collection<OIndex> indexes)
Internal.
|
Set<OIndex> |
getClassInvolvedIndexes(Collection<String> fields)
Returns list of indexes that contain passed in fields names as their first keys.
|
Set<OIndex> |
getClassInvolvedIndexes(String... fields) |
float |
getClassOverSize() |
int |
getClusterForNewInstance(ODocument doc) |
int[] |
getClusterIds() |
OClusterSelectionStrategy |
getClusterSelection() |
String |
getCustom(String iName) |
Set<String> |
getCustomKeys() |
int |
getDefaultClusterId() |
String |
getDescription() |
Collection<OProperty> |
getIndexedProperties() |
Set<OIndex> |
getIndexes() |
void |
getIndexes(Collection<OIndex> indexes)
Internal.
|
Set<OIndex> |
getInvolvedIndexes(Collection<String> fields)
Returns list of indexes that contain passed in fields names as their first keys.
|
Set<OIndex> |
getInvolvedIndexes(String... fields)
Returns list of indexes that contain passed in fields names as their first keys.
|
String |
getName() |
float |
getOverSize()
Returns the oversize factor.
|
int[] |
getPolymorphicClusterIds() |
OProperty |
getProperty(String iPropertyName) |
String |
getShortName() |
long |
getSize() |
String |
getStreamableName() |
Collection<OClass> |
getSubclasses() |
OClass |
getSuperClass()
Deprecated.
|
List<OClass> |
getSuperClasses() |
List<String> |
getSuperClassesNames() |
boolean |
hasClusterId(int clusterId) |
int |
hashCode() |
boolean |
hasPolymorphicClusterId(int clusterId) |
boolean |
hasSuperClasses() |
boolean |
isAbstract() |
boolean |
isStrictMode() |
boolean |
isSubClassOf(OClass iClass)
Returns true if the current instance extends the passed schema class (iClass).
|
boolean |
isSubClassOf(String iClassName)
Tells if the current instance extends the passed schema class (iClass).
|
boolean |
isSuperClassOf(OClass iClass)
Returns true if the passed schema class (iClass) extends the current instance.
|
Collection<OProperty> |
properties() |
Map<String,OProperty> |
propertiesMap() |
OClass |
removeClusterId(int iId) |
void |
removeCustom(String iName) |
OClass |
removeSuperClass(OClass superClass) |
OClass |
set(OClass.ATTRIBUTES attribute,
Object iValue) |
OClass |
setAbstract(boolean iAbstract) |
OClass |
setClusterSelection(OClusterSelectionStrategy clusterSelection) |
OClass |
setClusterSelection(String iStrategyName) |
OClass |
setCustom(String iName,
String iValue) |
void |
setDefaultClusterId(int iDefaultClusterId) |
OClass |
setDescription(String iDescription) |
OClass |
setName(String iName) |
OClass |
setOverSize(float overSize)
Sets the oversize factor.
|
OClass |
setShortName(String shortName) |
OClass |
setStrictMode(boolean iMode) |
OClass |
setSuperClass(OClass iSuperClass)
Deprecated.
|
OClass |
setSuperClasses(List<? extends OClass> classes) |
String |
toString() |
void |
truncate()
Truncates all the clusters the class uses.
|
OClass |
truncateCluster(String clusterName)
Removes all data in the cluster with given name.
|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
isEdgeType, isVertexType
protected final OClass delegate
public OClassAbstractDelegate(OClass delegate)
public OIndex getAutoShardingIndex()
OClass
getAutoShardingIndex
in interface OClass
public boolean isStrictMode()
isStrictMode
in interface OClass
public boolean isAbstract()
isAbstract
in interface OClass
public OClass setAbstract(boolean iAbstract)
setAbstract
in interface OClass
public OClass setStrictMode(boolean iMode)
setStrictMode
in interface OClass
@Deprecated public OClass getSuperClass()
getSuperClass
in interface OClass
@Deprecated public OClass setSuperClass(OClass iSuperClass)
setSuperClass
in interface OClass
public List<OClass> getSuperClasses()
getSuperClasses
in interface OClass
public boolean hasSuperClasses()
hasSuperClasses
in interface OClass
public OClass setSuperClasses(List<? extends OClass> classes)
setSuperClasses
in interface OClass
public List<String> getSuperClassesNames()
getSuperClassesNames
in interface OClass
public void getIndexes(Collection<OIndex> indexes)
OClass
getIndexes
in interface OClass
public OClass addSuperClass(OClass superClass)
addSuperClass
in interface OClass
public OClass removeSuperClass(OClass superClass)
removeSuperClass
in interface OClass
public String getStreamableName()
getStreamableName
in interface OClass
public Collection<OProperty> declaredProperties()
declaredProperties
in interface OClass
public Collection<OProperty> properties()
properties
in interface OClass
public Map<String,OProperty> propertiesMap()
propertiesMap
in interface OClass
public Collection<OProperty> getIndexedProperties()
getIndexedProperties
in interface OClass
public OProperty getProperty(String iPropertyName)
getProperty
in interface OClass
public OProperty createProperty(String iPropertyName, OType iType)
createProperty
in interface OClass
public OProperty createProperty(String iPropertyName, OType iType, OClass iLinkedClass)
createProperty
in interface OClass
public OProperty createProperty(String iPropertyName, OType iType, OClass iLinkedClass, boolean unsafe)
OClass
createProperty
in interface OClass
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 propertypublic OProperty createProperty(String iPropertyName, OType iType, OType iLinkedType)
createProperty
in interface OClass
public OProperty createProperty(String iPropertyName, OType iType, OType iLinkedType, boolean unsafe)
OClass
createProperty
in interface OClass
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 propertypublic void dropProperty(String iPropertyName)
dropProperty
in interface OClass
public boolean existsProperty(String iPropertyName)
existsProperty
in interface OClass
public int getClusterForNewInstance(ODocument doc)
getClusterForNewInstance
in interface OClass
public int getDefaultClusterId()
getDefaultClusterId
in interface OClass
public void setDefaultClusterId(int iDefaultClusterId)
setDefaultClusterId
in interface OClass
public int[] getClusterIds()
getClusterIds
in interface OClass
public OClass addClusterId(int iId)
addClusterId
in interface OClass
public OClusterSelectionStrategy getClusterSelection()
getClusterSelection
in interface OClass
public OClass setClusterSelection(OClusterSelectionStrategy clusterSelection)
setClusterSelection
in interface OClass
public OClass setClusterSelection(String iStrategyName)
setClusterSelection
in interface OClass
public OClass addCluster(String iClusterName)
addCluster
in interface OClass
public OClass truncateCluster(String clusterName)
truncateCluster
in interface OClass
clusterName
- Name of cluster to be truncated.public OClass removeClusterId(int iId)
removeClusterId
in interface OClass
public int[] getPolymorphicClusterIds()
getPolymorphicClusterIds
in interface OClass
public Collection<OClass> getSubclasses()
getSubclasses
in interface OClass
@Deprecated public Collection<OClass> getBaseClasses()
getBaseClasses
in interface OClass
public Collection<OClass> getAllSubclasses()
getAllSubclasses
in interface OClass
public Collection<OClass> getAllSuperClasses()
getAllSuperClasses
in interface OClass
@Deprecated public Collection<OClass> getAllBaseClasses()
getAllBaseClasses
in interface OClass
public float getOverSize()
OClass
getOverSize
in interface OClass
OClass.setOverSize(float)
public OClass setOverSize(float overSize)
OClass
setOverSize
in interface OClass
OClass.getOverSize()
public long count()
OClass
public long count(boolean iPolymorphic)
OClass
public void truncate() throws IOException
OClass
truncate
in interface OClass
IOException
public boolean isSubClassOf(String iClassName)
OClass
isSubClassOf
in interface OClass
OClass.isSuperClassOf(OClass)
public boolean isSubClassOf(OClass iClass)
OClass
isSubClassOf
in interface OClass
OClass.isSuperClassOf(OClass)
public boolean isSuperClassOf(OClass iClass)
OClass
isSuperClassOf
in interface OClass
OClass.isSubClassOf(OClass)
public String getShortName()
getShortName
in interface OClass
public OClass setShortName(String shortName)
setShortName
in interface OClass
public String getDescription()
getDescription
in interface OClass
public OClass setDescription(String iDescription)
setDescription
in interface OClass
public Object get(OClass.ATTRIBUTES iAttribute)
public OClass set(OClass.ATTRIBUTES attribute, Object iValue)
public OIndex createIndex(String iName, OClass.INDEX_TYPE iType, String... fields)
OClass
createIndex
in interface OClass
iName
- Database index nameiType
- Index type.fields
- Field names from which index will be created.public OIndex createIndex(String iName, String iType, String... fields)
OClass
createIndex
in interface OClass
iName
- Database index nameiType
- Index type.fields
- Field names from which index will be created.public OIndex createIndex(String iName, OClass.INDEX_TYPE iType, OProgressListener iProgressListener, String... fields)
OClass
createIndex
in interface OClass
iName
- Database index name.iType
- Index type.iProgressListener
- Progress listener.fields
- Field names from which index will be created.public OIndex createIndex(String iName, String iType, OProgressListener iProgressListener, ODocument metadata, String algorithm, String... fields)
OClass
createIndex
in interface OClass
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.public OIndex createIndex(String iName, String iType, OProgressListener iProgressListener, ODocument metadata, String... fields)
OClass
createIndex
in interface OClass
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.public Set<OIndex> getInvolvedIndexes(Collection<String> fields)
OClass
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.
getInvolvedIndexes
in interface OClass
fields
- Field names.OIndexDefinition.getParamCount()
public Set<OIndex> getInvolvedIndexes(String... fields)
OClass
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.
getInvolvedIndexes
in interface OClass
fields
- Field names.OClass.getInvolvedIndexes(java.util.Collection)
public Set<OIndex> getClassInvolvedIndexes(Collection<String> fields)
OClass
Indexes that related only to the given class will be returned.
getClassInvolvedIndexes
in interface OClass
fields
- Field names.OIndexDefinition.getParamCount()
public Set<OIndex> getClassInvolvedIndexes(String... fields)
getClassInvolvedIndexes
in interface OClass
fields
- Field names.OClass.getClassInvolvedIndexes(java.util.Collection)
public boolean areIndexed(Collection<String> fields)
OClass
areIndexed
in interface OClass
fields
- Field names.true
if given fields are contained as first key fields in class indexes.public boolean areIndexed(String... fields)
areIndexed
in interface OClass
fields
- Field names.true
if given fields are contained as first key fields in class indexes.OClass.areIndexed(java.util.Collection)
public OIndex getClassIndex(String iName)
OClass
getClassIndex
in interface OClass
iName
- Database index name.public Set<OIndex> getClassIndexes()
getClassIndexes
in interface OClass
public void getClassIndexes(Collection<OIndex> indexes)
OClass
getClassIndexes
in interface OClass
public Set<OIndex> getIndexes()
getIndexes
in interface OClass
public void removeCustom(String iName)
removeCustom
in interface OClass
public void clearCustom()
clearCustom
in interface OClass
public Set<String> getCustomKeys()
getCustomKeys
in interface OClass
public boolean hasClusterId(int clusterId)
hasClusterId
in interface OClass
public boolean hasPolymorphicClusterId(int clusterId)
hasPolymorphicClusterId
in interface OClass
public int compareTo(OClass o)
compareTo
in interface Comparable<OClass>
public float getClassOverSize()
getClassOverSize
in interface OClass
Copyright © 2009–2020 OrientDB. All rights reserved.