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

      • 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
      • 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
      • isMultiTenant

        public boolean isMultiTenant()
        Returns:
        isMultiTenant value
      • isUseScore

        public boolean isUseScore()
        Returns:
        the useScore