Class VitamCollection<T>
java.lang.Object
fr.gouv.vitam.common.database.collections.VitamCollection<T>
Vitam Collection for mongodb
-
Constructor Summary
ModifierConstructorDescriptionprotected
VitamCollection
(Class<T> clasz, boolean isMultiTenant, boolean useScore, String prefix, VitamDescriptionResolver vitamDescriptionResolver) -
Method Summary
Modifier and TypeMethodDescriptiongetClasz()
com.mongodb.client.MongoCollection<T>
getName()
void
initialize
(com.mongodb.client.MongoDatabase db, boolean recreate) Initialize the collectionvoid
initialize
(ElasticsearchAccess esClient) Initialize the ES Clientboolean
boolean
void
-
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 databaserecreate
- boolean if recreate the database
-
initialize
Initialize the ES Client- Parameters:
esClient
- ElasticsearchAccess ES Client
-
getName
- Returns:
- the name of the collection
-
setName
-
getCollection
- Returns:
- the associated MongoCollection
-
getClasz
- Returns:
- the associated class
-
getEsClient
- Returns:
- the esClient
-
isMultiTenant
public boolean isMultiTenant()- Returns:
- isMultiTenant value
-
isUseScore
public boolean isUseScore()- Returns:
- the useScore
-
getVitamDescriptionResolver
-