Class QueryToMongodb
java.lang.Object
fr.gouv.vitam.common.database.translators.mongodb.QueryToMongodb
Query to MongoDB
-
Method Summary
Modifier and TypeMethodDescriptionstatic org.bson.conversions.Bson
getCommand
(Query query) protected static Iterable<org.bson.conversions.Bson>
getCommands
(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
(String field, Collection<String> roots)
-
Method Details
-
getRoots
- 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
-