Class VitamCollection<T>
- java.lang.Object
-
- fr.gouv.vitam.common.database.collections.VitamCollection<T>
-
public class VitamCollection<T> extends java.lang.Object
Vitam Collection for mongodb
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
VitamCollection(java.lang.Class<T> clasz, boolean isMultiTenant, boolean useScore, java.lang.String prefix, VitamDescriptionResolver vitamDescriptionResolver)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Class<T>
getClasz()
com.mongodb.client.MongoCollection<T>
getCollection()
ElasticsearchAccess
getEsClient()
java.lang.String
getName()
VitamDescriptionResolver
getVitamDescriptionResolver()
void
initialize(com.mongodb.client.MongoDatabase db, boolean recreate)
Initialize the collectionvoid
initialize(ElasticsearchAccess esClient)
Initialize the ES Clientboolean
isMultiTenant()
boolean
isUseScore()
void
setName(java.lang.String name)
-
-
-
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 databaserecreate
- 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
-
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()
-
-