Package dev.morphia.annotations
Class IndexHelper
- java.lang.Object
-
- dev.morphia.annotations.IndexHelper
-
public final class IndexHelper extends Object
A helper class for dealing with index definitions- Since:
- 2.0
Developer note.This is an internal item. Its function and presence are subject to change without warning. Its use is highly discouraged.
-
-
Constructor Summary
Constructors Constructor Description IndexHelper(Mapper mapper)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.bson.Document
calculateKeys(EntityModel entityModel, Index index)
com.mongodb.client.model.Collation
convert(Collation collation)
Index
convert(Indexed indexed, String nameToStore)
com.mongodb.client.model.IndexOptions
convert(IndexOptions options)
Index
convert(Text text, String nameToStore)
void
createIndex(com.mongodb.client.MongoCollection<?> collection, EntityModel model)
void
createIndex(com.mongodb.client.MongoCollection<?> collection, EntityModel entityModel, Index index)
String
findField(EntityModel entityModel, IndexOptions options, String path)
-
-
-
Constructor Detail
-
IndexHelper
public IndexHelper(Mapper mapper)
- Parameters:
mapper
- the mapper
Developer note.This is an internal item. Its function and presence are subject to change without warning. Its use is highly discouraged.
-
-
Method Detail
-
calculateKeys
public org.bson.Document calculateKeys(EntityModel entityModel, Index index)
-
convert
public com.mongodb.client.model.IndexOptions convert(IndexOptions options)
-
convert
@Nullable public com.mongodb.client.model.Collation convert(Collation collation)
-
createIndex
public void createIndex(com.mongodb.client.MongoCollection<?> collection, EntityModel model)
- Parameters:
collection
- the collectionmodel
- the model
Developer note.This is an internal item. Its function and presence are subject to change without warning. Its use is highly discouraged.
-
createIndex
public void createIndex(com.mongodb.client.MongoCollection<?> collection, EntityModel entityModel, Index index)
-
findField
public String findField(EntityModel entityModel, IndexOptions options, String path)
-
-