Class VitamCollection<T>


  • public class VitamCollection<T>
    extends java.lang.Object
    Vitam Collection for mongodb
    • Constructor Detail

      • VitamCollection

        protected VitamCollection​(java.lang.Class<T> clasz,
                                  boolean isMultiTenant,
                                  boolean useScore,
                                  java.lang.String prefix,
                                  VitamDescriptionResolver vitamDescriptionResolver)
    • Method Detail

      • containMatch

        public static java.lang.Boolean containMatch()
        Returns:
        true if the real query contains match
      • setMatch

        public static void setMatch​(java.lang.Boolean match)
        Parameters:
        match - if the final query contains match
      • initialize

        public void initialize​(com.mongodb.client.MongoDatabase db,
                               boolean recreate)
        Initialize the collection
        Parameters:
        db - mongodb database
        recreate - boolean if recreate the database
      • initialize

        public void initialize​(ElasticsearchAccess esClient)
        Initialize the ES Client
        Parameters:
        esClient - ElasticsearchAccess ES Client
      • initialize

        public void initialize​(ElasticsearchAccess esClient,
                               boolean createIndexByTenant)
        Initialize the ES Client
        Parameters:
        esClient - ElasticsearchAccess ES Client
      • getName

        public java.lang.String getName()
        Returns:
        the name of the collection
      • setName

        public void setName​(java.lang.String name)
      • getCollection

        public com.mongodb.client.MongoCollection<T> getCollection()
        Returns:
        the associated MongoCollection
      • getClasz

        public java.lang.Class<T> getClasz()
        Returns:
        the associated class
      • getMongoClientOptions

        public static com.mongodb.MongoClientOptions getMongoClientOptions​(java.util.List<java.lang.Class<?>> claszList)
        Parameters:
        claszList - Vitam document extended class list
        Returns:
        MongoClientOptions for mongoClient
      • getMongoClientOptions

        public static com.mongodb.MongoClientOptions getMongoClientOptions()
      • isMultiTenant

        public boolean isMultiTenant()
        Returns:
        isMultiTenant value
      • isUseScore

        public boolean isUseScore()
        Returns:
        the useScore
      • isCreateIndexByTenant

        public boolean isCreateIndexByTenant()
      • setCreateIndexByTenant

        public void setCreateIndexByTenant​(boolean createIndexByTenant)