Class QueryToMongodb
- java.lang.Object
-
- fr.gouv.vitam.common.database.translators.mongodb.QueryToMongodb
-
public class QueryToMongodb extends java.lang.Object
Query to MongoDB
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static org.bson.conversions.Bson
getCommand(Query query)
protected static java.lang.Iterable<org.bson.conversions.Bson>
getCommands(java.util.List<Query> queries)
static org.bson.conversions.Bson
getFullCommand(org.bson.conversions.Bson command, org.bson.conversions.Bson roots)
Merge a request and a root filterstatic org.bson.conversions.Bson
getRoots(java.lang.String field, java.util.Collection<java.lang.String> roots)
-
-
-
Method Detail
-
getRoots
public static org.bson.conversions.Bson getRoots(java.lang.String field, java.util.Collection<java.lang.String> roots)
- Parameters:
field
- Stringroots
- 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
- Bsonroots
- 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 java.lang.Iterable<org.bson.conversions.Bson> getCommands(java.util.List<Query> queries)
-
-