Class OPropertyImpl
java.lang.Object
com.orientechnologies.orient.core.metadata.schema.OPropertyImpl
- All Implemented Interfaces:
OProperty,Comparable<OProperty>
- Direct Known Subclasses:
OPropertyEmbedded,OPropertyRemote
Contains the description of a persistent class property.
- Author:
- Luca Garulli (l.garulli--(at)--orientdb.com)
-
Nested Class Summary
Nested classes/interfaces inherited from interface com.orientechnologies.orient.core.metadata.schema.OProperty
OProperty.ATTRIBUTES -
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionOPropertyImpl(OClassImpl owner) OPropertyImpl(OClassImpl oClassImpl, OGlobalProperty global) -
Method Summary
Modifier and TypeMethodDescriptionvoidvoidvoidprotected voidcheckForDateFormat(String iDateAsString) static voidcheckLinkTypeSupport(OType type) static voidcheckSupportLinkedClass(OType type) intcreateIndex(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.voidDeprecated.booleanvoidfromStream(ODocument document) get(OProperty.ATTRIBUTES attribute) protected ODatabaseDocumentInternalDefault 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()inthashCode()protected booleanbooleanDeprecated.UseOClass.areIndexed(String...)instead.booleanbooleanbooleanprotected static ObjectvoidvoidvoidremoveCustom(String iName) voidset(OProperty.ATTRIBUTES attribute, Object iValue) setCollate(OCollate collate) toStream()toString()Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface com.orientechnologies.orient.core.metadata.schema.OProperty
clearCustom, setCollate, setCustom, setDefaultValue, setDescription, setLinkedClass, setLinkedType, setMandatory, setMax, setMin, setName, setNotNull, setReadonly, setRegexp, setType
-
Field Details
-
owner
-
linkedType
-
linkedClass
-
linkedClassName
-
description
-
mandatory
protected boolean mandatory -
notNull
protected boolean notNull -
min
-
max
-
defaultValue
-
regexp
-
readonly
protected boolean readonly -
customFields
-
collate
-
globalRef
-
-
Constructor Details
-
OPropertyImpl
-
OPropertyImpl
-
-
Method Details
-
getName
-
getFullName
Description copied from interface:OPropertyReturns the full name as. - Specified by:
getFullNamein interfaceOProperty
-
getFullNameQuoted
-
getType
-
compareTo
- Specified by:
compareToin interfaceComparable<OProperty>
-
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.- Specified by:
createIndexin interfaceOProperty- Parameters:
iType- One of types supported.- UNIQUE: Doesn't allow duplicates
- NOTUNIQUE: Allow duplicates
- FULLTEXT: Indexes single word for full text search
- Returns:
-
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.- Specified by:
createIndexin interfaceOProperty- Parameters:
iType-- Returns:
-
createIndex
Description copied from interface:OPropertyCreates 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.- Specified by:
createIndexin interfaceOProperty- 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
Description copied from interface:OPropertyCreates 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.- Specified by:
createIndexin interfaceOProperty- 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- Specified by:
dropIndexesin interfaceOProperty- Returns:
-
dropIndexesInternal
Deprecated.Remove the index on property -
getIndex
Deprecated.UseOClass.getInvolvedIndexes(String...)instead.Returns the first index defined for the property. -
getIndexes
Deprecated.UseOClass.getInvolvedIndexes(String...)instead.- Specified by:
getIndexesin interfaceOProperty- Returns:
- All indexes in which this property participates as first key item.
-
isIndexed
Deprecated.UseOClass.areIndexed(String...)instead.Description copied from interface:OPropertyIndicates 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 useOProperty.getAllIndexes()instead. -
getOwnerClass
- Specified by:
getOwnerClassin interfaceOProperty
-
getLinkedClass
Returns the linked class in lazy mode because while unmarshalling the class could be not loaded yet.- Specified by:
getLinkedClassin interfaceOProperty- Returns:
-
checkSupportLinkedClass
-
getLinkedType
- Specified by:
getLinkedTypein interfaceOProperty
-
checkLinkTypeSupport
-
isNotNull
public boolean isNotNull() -
isMandatory
public boolean isMandatory()- Specified by:
isMandatoryin interfaceOProperty
-
isReadonly
public boolean isReadonly()- Specified by:
isReadonlyin interfaceOProperty
-
getMin
Description copied from interface:OPropertyMin 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
-
getMax
Description copied from interface:OPropertyMax 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
-
quoteString
-
getDefaultValue
Description copied from interface:OPropertyDefault value for the property; can be function- Specified by:
getDefaultValuein interfaceOProperty- Returns:
- String, can be null
-
getRegexp
-
getCustom
-
getCustomInternal
-
removeCustom
- Specified by:
removeCustomin interfaceOProperty
-
getCustomKeys
- Specified by:
getCustomKeysin interfaceOProperty
-
get
-
set
-
getCollate
- Specified by:
getCollatein interfaceOProperty
-
setCollate
- Specified by:
setCollatein interfaceOProperty
-
getDescription
- Specified by:
getDescriptionin interfaceOProperty
-
toString
-
hashCode
public int hashCode() -
equals
-
fromStream
-
getAllIndexes
- Specified by:
getAllIndexesin interfaceOProperty- Returns:
- All indexes in which this property participates.
-
toStream
-
acquireSchemaReadLock
public void acquireSchemaReadLock() -
releaseSchemaReadLock
public void releaseSchemaReadLock() -
acquireSchemaWriteLock
public void acquireSchemaWriteLock() -
releaseSchemaWriteLock
public void releaseSchemaWriteLock() -
checkEmbedded
public void checkEmbedded() -
getDatabase
-
checkForDateFormat
-
isDistributedCommand
protected boolean isDistributedCommand() -
getId
-
toNetworkStream
-