Class MongoDbMetadataHelper


  • @Deprecated
    public class MongoDbMetadataHelper
    extends java.lang.Object
    Deprecated.
    MongoDb Helper for Metadata
    • Method Summary

      All Methods Static Methods Concrete Methods Deprecated Methods 
      Modifier and Type Method Description
      static Result createOneResult​(BuilderToken.FILTERARGS type)
      Deprecated.
       
      static Result createOneResult​(BuilderToken.FILTERARGS type, java.util.Collection<java.lang.String> set)
      Deprecated.
       
      static com.mongodb.client.result.DeleteResult delete​(MetadataCollections collection, org.bson.conversions.Bson condition, int nb)
      Deprecated.
       
      static MetadataDocument findOne​(MetadataCollections col, java.lang.String id)
      Deprecated.
      Find the corresponding id in col collection if it exists.
      static 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
      static 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
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • 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 collection
        id - 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 request
        condition - where condition
        projection - 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 request
        condition - where condition
        projection - select condition
        orderBy - orderBy condition
        offset - 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 request
        condition - where condition
        nb - 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 ids
        ancestorIds - 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 filter
        set - of collection for creating Result
        Returns:
        a new Result