public class OPropertyMapIndexDefinition extends OAbstractIndexDefinitionMultiValue
Modifier and Type | Class and Description |
---|---|
static class |
OPropertyMapIndexDefinition.INDEX_BY
Indicates whether Map will be indexed using its keys or values.
|
className, field, keyType
collate
document
Constructor and Description |
---|
OPropertyMapIndexDefinition() |
OPropertyMapIndexDefinition(String iClassName,
String iField,
OType iType,
OPropertyMapIndexDefinition.INDEX_BY indexBy) |
Modifier and Type | Method and Description |
---|---|
Object |
createSingleValue(Object... param)
Converts passed in value in the key of single index entry.
|
Object |
createValue(List<?> params)
Calculates key value by passed in parameters.
|
Object |
createValue(Object... params)
Calculates key value by passed in parameters.
|
boolean |
equals(Object o) |
Object |
getDocumentValueToIndex(ODocument iDocument) |
List<String> |
getFieldsToIndex() |
OPropertyMapIndexDefinition.INDEX_BY |
getIndexBy() |
int |
hashCode() |
void |
processChangeEvent(OMultiValueChangeEvent<?,?> changeEvent,
Map<Object,Integer> keysToAdd,
Map<Object,Integer> keysToRemove)
Process event that contains operation on collection and extract values that should be added
removed from index to reflect collection changes in the given index.
|
protected void |
serializeFromStream() |
protected void |
serializeToStream() |
String |
toCreateIndexDDL(String indexName,
String indexType,
String engine) |
String |
toString() |
isAutomatic, processAdd, processRemoval
createIndexDDLWithFieldType, createIndexDDLWithoutFieldType, fromStream, getClassName, getFields, getParamCount, getTypes, toStream
getCollate, isNullValuesIgnored, setCollate, setCollate, setNullValuesIgnored
fromStream, load, reload, reload, save, save
getDocument, load, reload
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
fromStream, getClassName, getCollate, getFields, getParamCount, getTypes, isNullValuesIgnored, setCollate, setNullValuesIgnored, toStream
public OPropertyMapIndexDefinition()
public OPropertyMapIndexDefinition(String iClassName, String iField, OType iType, OPropertyMapIndexDefinition.INDEX_BY indexBy)
public Object getDocumentValueToIndex(ODocument iDocument)
getDocumentValueToIndex
in interface OIndexCallback
getDocumentValueToIndex
in class OPropertyIndexDefinition
public Object createValue(List<?> params)
OIndexDefinition
If it is impossible to calculate key value by given parameters null
will be
returned.
createValue
in interface OIndexDefinition
createValue
in class OPropertyIndexDefinition
params
- Parameters from which index key will be calculated.public Object createValue(Object... params)
OPropertyIndexDefinition
If it is impossible to calculate key value by given parameters null
will be
returned.
createValue
in interface OIndexDefinition
createValue
in class OPropertyIndexDefinition
params
- Parameters from which index key will be calculated.public OPropertyMapIndexDefinition.INDEX_BY getIndexBy()
protected void serializeToStream()
serializeToStream
in class OPropertyIndexDefinition
protected void serializeFromStream()
serializeFromStream
in class OPropertyIndexDefinition
public boolean equals(Object o)
OIndexDefinition
equals
in interface OIndexDefinition
equals
in class OPropertyIndexDefinition
public Object createSingleValue(Object... param)
OIndexDefinitionMultiValue
param
- Value to convert.public void processChangeEvent(OMultiValueChangeEvent<?,?> changeEvent, Map<Object,Integer> keysToAdd, Map<Object,Integer> keysToRemove)
OIndexDefinitionMultiValue
changeEvent
- Event that describes operation that was performed on collection.keysToAdd
- Values that should be added to related index.keysToRemove
- Values that should be removed to related index.public List<String> getFieldsToIndex()
getFieldsToIndex
in interface OIndexDefinition
getFieldsToIndex
in class OPropertyIndexDefinition
Map
values) which given index is used to calculate key value. Order of fields is
important.public int hashCode()
OIndexDefinition
hashCode
in interface OIndexDefinition
hashCode
in class OPropertyIndexDefinition
public String toString()
OIndexDefinition
toString
in interface OIndexDefinition
toString
in class OPropertyIndexDefinition
public String toCreateIndexDDL(String indexName, String indexType, String engine)
OPropertyIndexDefinition
toCreateIndexDDL
in interface OIndexDefinition
toCreateIndexDDL
in class OPropertyIndexDefinition
Copyright © 2009–2020 OrientDB. All rights reserved.