public class OCompositeIndexDefinition extends OAbstractIndexDefinition
OPropertyIndexDefinition
.document
Constructor and Description |
---|
OCompositeIndexDefinition() |
OCompositeIndexDefinition(String iClassName)
Constructor for new index creation.
|
OCompositeIndexDefinition(String iClassName,
List<? extends OIndexDefinition> iIndexes,
int version)
Constructor for new index creation.
|
Modifier and Type | Method and Description |
---|---|
void |
addIndex(OIndexDefinition indexDefinition)
Add new indexDefinition in current composite.
|
OCompositeKey |
createSingleValue(List<?> params) |
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) |
protected void |
fromStream() |
String |
getClassName() |
OCollate |
getCollate() |
Object |
getDocumentValueToIndex(ODocument iDocument) |
List<String> |
getFields() |
List<String> |
getFieldsToIndex() |
OIndexDefinitionMultiValue |
getMultiValueDefinition() |
int |
getMultiValueDefinitionIndex() |
String |
getMultiValueField() |
int |
getParamCount()
Returns amount of parameters that are used to calculate key value.
|
OType[] |
getTypes()
Return types of values from which index key consist.
|
int |
hashCode() |
boolean |
isAutomatic() |
void |
processChangeEvent(OMultiValueChangeEvent<?,?> changeEvent,
Map<OCompositeKey,Integer> keysToAdd,
Map<OCompositeKey,Integer> keysToRemove,
Object... params) |
protected void |
serializeFromStream() |
protected void |
serializeToStream() |
void |
setCollate(OCollate collate) |
String |
toCreateIndexDDL(String indexName,
String indexType,
String engine) |
ODocument |
toStream()
Serializes internal index state to document.
|
String |
toString() |
isNullValuesIgnored, setCollate, setNullValuesIgnored
fromStream, load, reload, reload, save, save
getDocument, load, reload
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
fromStream
public OCompositeIndexDefinition()
public OCompositeIndexDefinition(String iClassName)
iClassName
- - name of class which is owner of this indexpublic OCompositeIndexDefinition(String iClassName, List<? extends OIndexDefinition> iIndexes, int version)
iClassName
- - name of class which is owner of this indexiIndexes
- List of indexDefinitions to add in given index.public String getClassName()
public void addIndex(OIndexDefinition indexDefinition)
indexDefinition
- Index to add.public List<String> getFields()
public List<String> getFieldsToIndex()
Map
values) which given index is used to calculate key value. Order of fields is
important.public int getMultiValueDefinitionIndex()
public String getMultiValueField()
public Object createValue(List<?> params)
If it is impossible to calculate key value by given parameters null
will be
returned.
params
- Parameters from which index key will be calculated.public OIndexDefinitionMultiValue getMultiValueDefinition()
public OCompositeKey createSingleValue(List<?> params)
public Object createValue(Object... params)
If it is impossible to calculate key value by given parameters null
will be
returned.
params
- Parameters from which index key will be calculated.public void processChangeEvent(OMultiValueChangeEvent<?,?> changeEvent, Map<OCompositeKey,Integer> keysToAdd, Map<OCompositeKey,Integer> keysToRemove, Object... params)
public int getParamCount()
getTypes().length
.public OType[] getTypes()
public boolean equals(Object o)
OIndexDefinition
equals
in interface OIndexDefinition
equals
in class OAbstractIndexDefinition
public int hashCode()
OIndexDefinition
hashCode
in interface OIndexDefinition
hashCode
in class OAbstractIndexDefinition
public String toString()
OIndexDefinition
toString
in interface OIndexDefinition
toString
in class ODocumentWrapper
public ODocument toStream()
toStream
in interface OIndexDefinition
toStream
in class ODocumentWrapper
protected void serializeToStream()
serializeToStream
in class OAbstractIndexDefinition
protected void fromStream()
fromStream
in class ODocumentWrapperNoClass
protected void serializeFromStream()
serializeFromStream
in class OAbstractIndexDefinition
public OCollate getCollate()
getCollate
in interface OIndexDefinition
getCollate
in class OAbstractIndexDefinition
public void setCollate(OCollate collate)
setCollate
in interface OIndexDefinition
setCollate
in class OAbstractIndexDefinition
public boolean isAutomatic()
Copyright © 2009–2020 OrientDB. All rights reserved.