Interface OIndexDefinition
- All Superinterfaces:
OIndexCallback
- All Known Subinterfaces:
OIndexDefinitionMultiValue
- All Known Implementing Classes:
OAbstractIndexDefinition,OCompositeIndexDefinition,OPropertyIndexDefinition,OPropertyListIndexDefinition,OPropertyMapIndexDefinition,OPropertyRidBagIndexDefinition,ORuntimeKeyIndexDefinition,OSimpleKeyIndexDefinition
Presentation of index that is used information and contained in document
OClass .
This object cannot be created directly, use OClass manipulation method instead.
- Author:
- Andrey Lomakin (a.lomakin-at-orientdb.com), Artem Orobets
-
Method Summary
Modifier and TypeMethodDescriptioncreateValue(Object... params) Calculates key value by passed in parameters.createValue(List<?> params) Calculates key value by passed in parameters.booleanvoidfromStream(ODocument document) Deserialize internal index state from document.intReturns amount of parameters that are used to calculate key value.OType[]getTypes()Return types of values from which index key consist.inthashCode()booleanbooleanvoidsetCollate(OCollate collate) voidsetNullValuesIgnored(boolean value) toCreateIndexDDL(String indexName, String indexType, String engine) toStream()Serializes internal index state to document.toString()Methods inherited from interface com.orientechnologies.orient.core.index.OIndexCallback
getDocumentValueToIndex
-
Method Details
-
getFields
- Returns:
- Names of fields which given index is used to calculate key value. Order of fields is important.
-
getFieldsToIndex
- Returns:
- Names of fields and their index modifiers (like "by value" for fields that hold
Mapvalues) which given index is used to calculate key value. Order of fields is important.
-
getClassName
String getClassName()- Returns:
- Name of the class which this index belongs to.
-
equals
-
hashCode
int hashCode() -
toString
String toString() -
createValue
Calculates key value by passed in parameters.If it is impossible to calculate key value by given parameters
nullwill be returned.- Parameters:
params- Parameters from which index key will be calculated.- Returns:
- Key value or null if calculation is impossible.
-
createValue
Calculates key value by passed in parameters.If it is impossible to calculate key value by given parameters
nullwill be returned.- Parameters:
params- Parameters from which index key will be calculated.- Returns:
- Key value or null if calculation is impossible.
-
getParamCount
int getParamCount()Returns amount of parameters that are used to calculate key value. It does not mean that all parameters should be supplied. It only means that if you provide more parameters they will be ignored and will not participate in index key calculation.- Returns:
- Amount of that are used to calculate key value. Call result should be equals to
getTypes().length.
-
getTypes
OType[] getTypes()Return types of values from which index key consist. In case of index that is built on single document property value single array that contains property type will be returned. In case of composite indexes result will contain several key types.- Returns:
- Types of values from which index key consist.
-
toStream
ODocument toStream()Serializes internal index state to document.- Returns:
- Document that contains internal index state.
-
fromStream
Deserialize internal index state from document.- Parameters:
document- Serialized index presentation.
-
toCreateIndexDDL
-
isAutomatic
boolean isAutomatic() -
getCollate
OCollate getCollate() -
setCollate
-
isNullValuesIgnored
boolean isNullValuesIgnored() -
setNullValuesIgnored
void setNullValuesIgnored(boolean value)
-