Class 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 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

        @Nullable
        public Index convert​(@Nullable
                             Text text,
                             String nameToStore)
      • convert

        @Nullable
        public Index convert​(@Nullable
                             Indexed indexed,
                             String nameToStore)
      • 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 collection
        model - 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)