Class OIndexDefinitionFactory
java.lang.Object
com.orientechnologies.orient.core.index.OIndexDefinitionFactory
Contains helper methods for
OIndexDefinition creation.
IMPORTANT: This class designed for internal usage only.
- Author:
- Artem Orobets
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic OIndexDefinitioncreateIndexDefinition(OClass oClass, List<String> fieldNames, List<OType> types, List<OCollate> collates, String indexKind, String algorithm) Creates an instance ofOIndexDefinitionfor automatic index.static OIndexDefinitioncreateSingleFieldIndexDefinition(String className, String fieldName, OType type, OType linkedType, OCollate collate, String indexKind, OPropertyMapIndexDefinition.INDEX_BY indexBy) static StringextractFieldName(String fieldDefinition) Extract field name from '[by key|value]' field format.
-
Constructor Details
-
OIndexDefinitionFactory
public OIndexDefinitionFactory()
-
-
Method Details
-
createIndexDefinition
public static OIndexDefinition createIndexDefinition(OClass oClass, List<String> fieldNames, List<OType> types, List<OCollate> collates, String indexKind, String algorithm) Creates an instance ofOIndexDefinitionfor automatic index.- Parameters:
oClass- class which will be indexedfieldNames- list of properties which will be indexed. Format should be '[by key|value]', use 'by key' or 'by value' to describe how to index maps. By default maps indexed by key types- types of indexed propertiescollates-indexKind-algorithm-- Returns:
- index definition instance
-
extractFieldName
Extract field name from '[by key|value]' field format. - Parameters:
fieldDefinition- definition of field- Returns:
- extracted property name
-
createSingleFieldIndexDefinition
public static OIndexDefinition createSingleFieldIndexDefinition(String className, String fieldName, OType type, OType linkedType, OCollate collate, String indexKind, OPropertyMapIndexDefinition.INDEX_BY indexBy)
-