Interface OProperty
- All Superinterfaces:
Comparable<OProperty>
- All Known Implementing Classes:
OImmutableProperty,OPropertyAbstractDelegate,OPropertyDistributed,OPropertyEmbedded,OPropertyImpl,OPropertyRemote
Contains the description of a persistent class property.
- Author:
- Luca Garulli (l.garulli--(at)--orientdb.com)
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionvoidcreateIndex(OClass.INDEX_TYPE iType) Creates an index on this property.createIndex(OClass.INDEX_TYPE iType, ODocument metadata) Creates an index on this property.createIndex(String iType) Creates an index on this property.createIndex(String iType, ODocument metadata) Creates an index on this property.Deprecated.Use SQL command instead.get(OProperty.ATTRIBUTES iAttribute) Default value for the property; can be functionReturns the full name as. getId()getIndex()Deprecated.UseOClass.getInvolvedIndexes(String...)instead.Deprecated.UseOClass.getInvolvedIndexes(String...)instead.Returns the linked class in lazy mode because while unmarshalling the class could be not loaded yet.getMax()Max behavior depends on the Property OType.getMin()Min behavior depends on the Property OType.getName()getType()booleanDeprecated.UseOClass.areIndexed(String...)instead.booleanbooleanbooleanvoidremoveCustom(String iName) voidset(OProperty.ATTRIBUTES attribute, Object iValue) setCollate(OCollate collate) setCollate(String iCollateName) setDefaultValue(String defaultValue) setDescription(String iDescription) setLinkedClass(OClass oClass) setLinkedType(OType type) setMandatory(boolean mandatory) setNotNull(boolean iNotNull) setReadonly(boolean iReadonly) Change the type.Methods inherited from interface java.lang.Comparable
compareTo
-
Method Details
-
getName
String getName() -
getFullName
String getFullName()Returns the full name as. -
setName
-
set
-
getType
OType getType() -
getLinkedClass
OClass getLinkedClass()Returns the linked class in lazy mode because while unmarshalling the class could be not loaded yet.- Returns:
-
setLinkedClass
-
getLinkedType
OType getLinkedType() -
setLinkedType
-
isNotNull
boolean isNotNull() -
setNotNull
-
getCollate
OCollate getCollate() -
setCollate
-
setCollate
-
isMandatory
boolean isMandatory() -
setMandatory
-
isReadonly
boolean isReadonly() -
setReadonly
-
getMin
String getMin()Min behavior depends on the Property OType.- String : minimum length
- Number : minimum value
- date and time : minimum time in millisecond, date must be written in the storage date format
- binary : minimum size of the byte array
- List,Set,Collection : minimum size of the collection
- Returns:
- String, can be null
-
setMin
- Parameters:
min- can be null- Returns:
- this property
- See Also:
-
getMax
String getMax()Max behavior depends on the Property OType.- String : maximum length
- Number : maximum value
- date and time : maximum time in millisecond, date must be written in the storage date format
- binary : maximum size of the byte array
- List,Set,Collection : maximum size of the collection
- Returns:
- String, can be null
-
setMax
- Parameters:
max- can be null- Returns:
- this property
- See Also:
-
getDefaultValue
String getDefaultValue()Default value for the property; can be function- Returns:
- String, can be null
-
setDefaultValue
- Parameters:
defaultValue- can be null- Returns:
- this property
- See Also:
-
createIndex
Creates an index on this property. Indexes speed up queries but slow down insert and update operations. For massive inserts we suggest to remove the index, make the massive insert and recreate it.- Parameters:
iType- One of types supported.- UNIQUE: Doesn't allow duplicates
- NOTUNIQUE: Allow duplicates
- FULLTEXT: Indexes single word for full text search
- Returns:
- see
OClass.createIndex(String, OClass.INDEX_TYPE, String...).
-
createIndex
Creates an index on this property. Indexes speed up queries but slow down insert and update operations. For massive inserts we suggest to remove the index, make the massive insert and recreate it.- Parameters:
iType-- Returns:
- see
OClass.createIndex(String, OClass.INDEX_TYPE, String...).
-
createIndex
Creates an index on this property. Indexes speed up queries but slow down insert and update operations. For massive inserts we suggest to remove the index, make the massive insert and recreate it.- Parameters:
iType- One of types supported.- UNIQUE: Doesn't allow duplicates
- NOTUNIQUE: Allow duplicates
- FULLTEXT: Indexes single word for full text search
metadata- the index metadata- Returns:
- see
OClass.createIndex(String, OClass.INDEX_TYPE, String...).
-
createIndex
Creates an index on this property. Indexes speed up queries but slow down insert and update operations. For massive inserts we suggest to remove the index, make the massive insert and recreate it.- Parameters:
iType- One of types supported.- UNIQUE: Doesn't allow duplicates
- NOTUNIQUE: Allow duplicates
- FULLTEXT: Indexes single word for full text search
metadata- the index metadata- Returns:
- see
OClass.createIndex(String, OClass.INDEX_TYPE, String...).
-
dropIndexes
Deprecated.Use SQL command instead.Remove the index on property- Returns:
-
getIndexes
Deprecated.UseOClass.getInvolvedIndexes(String...)instead.- Returns:
- All indexes in which this property participates as first key item.
-
getIndex
Deprecated.UseOClass.getInvolvedIndexes(String...)instead.- Returns:
- The first index in which this property participates as first key item.
-
getAllIndexes
Collection<OIndex> getAllIndexes()- Returns:
- All indexes in which this property participates.
-
isIndexed
Deprecated.UseOClass.areIndexed(String...)instead.Indicates whether property is contained in indexes as its first key item. If you would like to fetch all indexes or check property presence in other indexes usegetAllIndexes()instead.- Returns:
trueif and only if this property is contained in indexes as its first key item.
-
getRegexp
String getRegexp() -
setRegexp
-
setType
Change the type. It checks for compatibility between the change of type.- Parameters:
iType-
-
getCustom
-
setCustom
-
removeCustom
-
clearCustom
void clearCustom() -
getCustomKeys
-
getOwnerClass
OClass getOwnerClass() -
get
-
getId
Integer getId() -
getDescription
String getDescription() -
setDescription
-