java.lang.Object
fr.gouv.vitam.common.database.translators.mongodb.QueryToMongodb

public class QueryToMongodb extends Object
Query to MongoDB
  • Method Details

    • getRoots

      public static org.bson.conversions.Bson getRoots(String field, Collection<String> roots)
      Parameters:
      field - String
      roots - Set of String
      Returns:
      the filter associated with the roots
    • getFullCommand

      public static org.bson.conversions.Bson getFullCommand(org.bson.conversions.Bson command, org.bson.conversions.Bson roots)
      Merge a request and a root filter
      Parameters:
      command - Bson
      roots - Bson
      Returns:
      the complete request
    • getCommand

      public static org.bson.conversions.Bson getCommand(Query query) throws InvalidParseOperationException
      Parameters:
      query - Query
      Returns:
      the associated MongoDB BSON request
      Throws:
      InvalidParseOperationException - if query could not parse to command
    • getCommands

      protected static Iterable<org.bson.conversions.Bson> getCommands(List<Query> queries)