Package fr.gouv.vitam.common.database.collections

# Class VitamCollection<T>

java.lang.Object
fr.gouv.vitam.common.database.collections.VitamCollection<T>

public class VitamCollection<T> extends Object
Vitam Collection for mongodb

- ## Constructor Summary

  Constructors
  Modifier
  Constructor
  Description
  `protected`
  `VitamCollection(Class<T> clasz, boolean isMultiTenant, boolean useScore, String prefix, VitamDescriptionResolver vitamDescriptionResolver)`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `Class<T>`
  `getClasz()`
  `com.mongodb.client.MongoCollection<T>`
  `getCollection()`
  `ElasticsearchAccess`
  `getEsClient()`
  `String`
  `getName()`
  `VitamDescriptionResolver`
  `getVitamDescriptionResolver()`
  `void`
  `initialize(com.mongodb.client.MongoDatabase db, boolean recreate)`
  Initialize the collection
  `void`
  `initialize(ElasticsearchAccess esClient)`
  Initialize the ES Client
  `boolean`
  `isMultiTenant()`
  `boolean`
  `isUseScore()`
  `void`
  `setName(String name)`

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Constructor Details

  - ### VitamCollection

    protected VitamCollection(Class<T> clasz, boolean isMultiTenant, boolean useScore, String prefix, VitamDescriptionResolver vitamDescriptionResolver)

- ## Method Details

  - ### 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 String getName()
    Returns:
      the name of the collection

  - ### setName

    public void setName(String name)

  - ### getCollection

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

  - ### getClasz

    public Class<T> getClasz()
    Returns:
      the associated class

  - ### getEsClient

    public ElasticsearchAccess getEsClient()
    Returns:
      the esClient

  - ### isMultiTenant

    public boolean isMultiTenant()
    Returns:
      isMultiTenant value

  - ### isUseScore

    public boolean isUseScore()
    Returns:
      the useScore

  - ### getVitamDescriptionResolver

    public VitamDescriptionResolver getVitamDescriptionResolver()