Class MongoDbMetadataHelper
java.lang.Object
fr.gouv.vitam.metadata.core.database.collections.MongoDbMetadataHelper
Deprecated.
MongoDb Helper for Metadata
-
Method Summary
Modifier and TypeMethodDescriptionstatic Result
Deprecated.static Result
createOneResult
(BuilderToken.FILTERARGS type, Collection<String> set) Deprecated.static final com.mongodb.client.result.DeleteResult
delete
(MetadataCollections collection, org.bson.conversions.Bson condition, int nb) Deprecated.static final MetadataDocument
findOne
(MetadataCollections col, String id) Deprecated.Find the corresponding id in col collection if it exists.static final org.bson.conversions.Bson
queryForAncestorsOrSame
(Collection<String> targetIds, Collection<String> ancestorIds) Deprecated.Used to filter Units/OG according to some Units ancestorsstatic final com.mongodb.client.FindIterable<?>
select
(MetadataCollections collection, org.bson.conversions.Bson condition, org.bson.conversions.Bson projection) Deprecated.Does not call getAfterLoad.static final com.mongodb.client.FindIterable<?>
select
(MetadataCollections collection, org.bson.conversions.Bson condition, org.bson.conversions.Bson projection, org.bson.conversions.Bson orderBy, int offset, int limit) Deprecated.Does not call getAfterLoad.static final com.mongodb.client.FindIterable<?>
selectFiltered
(com.mongodb.client.FindIterable<?> find, org.bson.conversions.Bson orderBy, int offset, int limit) Deprecated.Aff orderBy and offset and limit if not null or not -1
-
Method Details
-
findOne
Deprecated.Find the corresponding id in col collection if it exists. Calls getAfterLoad- Parameters:
col
- (not results except if already hashed) the working collectionid
- the id value for searching in collection field- Returns:
- the MetadataDocument casted object using ID = id
-
select
public static final com.mongodb.client.FindIterable<?> select(MetadataCollections collection, org.bson.conversions.Bson condition, org.bson.conversions.Bson projection) Deprecated.Does not call getAfterLoad.- Parameters:
collection
- domain of requestcondition
- where conditionprojection
- select condition- Returns:
- the FindIterable on the find request based on the given collection
-
select
public static final com.mongodb.client.FindIterable<?> select(MetadataCollections collection, org.bson.conversions.Bson condition, org.bson.conversions.Bson projection, org.bson.conversions.Bson orderBy, int offset, int limit) Deprecated.Does not call getAfterLoad.- Parameters:
collection
- domain of requestcondition
- where conditionprojection
- select conditionorderBy
- orderBy conditionoffset
- offset (0 by default)limit
- limit (0 for no limit)- Returns:
- the FindIterable on the find request based on the given collection
-
selectFiltered
public static final com.mongodb.client.FindIterable<?> selectFiltered(com.mongodb.client.FindIterable<?> find, org.bson.conversions.Bson orderBy, int offset, int limit) Deprecated.Aff orderBy and offset and limit if not null or not -1- Parameters:
find
-orderBy
-offset
-limit
-- Returns:
- the modified FindIterable
-
delete
public static final com.mongodb.client.result.DeleteResult delete(MetadataCollections collection, org.bson.conversions.Bson condition, int nb) throws MetaDataExecutionException Deprecated.- Parameters:
collection
- domain of requestcondition
- where conditionnb
- nb of item to delete- Returns:
- the DeleteResult on the update request based on the given collection
- Throws:
MetaDataExecutionException
- if a mongo operation exception occurred
-
queryForAncestorsOrSame
public static final org.bson.conversions.Bson queryForAncestorsOrSame(Collection<String> targetIds, Collection<String> ancestorIds) Deprecated.Used to filter Units/OG according to some Units ancestors- Parameters:
targetIds
- set of target idsancestorIds
- set of ancestor ids- Returns:
- the Filter condition to find if ancestorIds are ancestors of targetIds or equals to targetIds
-
createOneResult
Deprecated.- Parameters:
type
- of filter- Returns:
- a new Result
-
createOneResult
Deprecated.- Parameters:
type
- of filterset
- of collection for creating Result- Returns:
- a new Result
-
MongoDbMetadataRepository