Class MongoDbMetadataHelper
- java.lang.Object
-
- fr.gouv.vitam.metadata.core.database.collections.MongoDbMetadataHelper
-
@Deprecated public class MongoDbMetadataHelper extends java.lang.ObjectDeprecated.MongoDb Helper for Metadata
-
-
Method Summary
All Methods Static Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static ResultcreateOneResult(BuilderToken.FILTERARGS type)Deprecated.static ResultcreateOneResult(BuilderToken.FILTERARGS type, java.util.Collection<java.lang.String> set)Deprecated.static com.mongodb.client.result.DeleteResultdelete(MetadataCollections collection, org.bson.conversions.Bson condition, int nb)Deprecated.static MetadataDocumentfindOne(MetadataCollections col, java.lang.String id)Deprecated.Find the corresponding id in col collection if it exists.static org.bson.conversions.BsonqueryForAncestorsOrSame(java.util.Collection<java.lang.String> targetIds, java.util.Collection<java.lang.String> ancestorIds)Deprecated.Used to filter Units/OG according to some Units ancestorsstatic com.mongodb.client.FindIterable<?>select(MetadataCollections collection, org.bson.conversions.Bson condition, org.bson.conversions.Bson projection)Deprecated.Does not call getAfterLoad.static 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 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 Detail
-
findOne
public static final MetadataDocument findOne(MetadataCollections col, java.lang.String id)
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(java.util.Collection<java.lang.String> targetIds, java.util.Collection<java.lang.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
public static Result createOneResult(BuilderToken.FILTERARGS type)
Deprecated.- Parameters:
type- of filter- Returns:
- a new Result
-
createOneResult
public static Result createOneResult(BuilderToken.FILTERARGS type, java.util.Collection<java.lang.String> set)
Deprecated.- Parameters:
type- of filterset- of collection for creating Result- Returns:
- a new Result
-
-