Package dev.morphia.query
Class AbstractQueryFactory
- java.lang.Object
-
- dev.morphia.query.AbstractQueryFactory
-
- All Implemented Interfaces:
QueryFactory
- Direct Known Subclasses:
DefaultQueryFactory
public abstract class AbstractQueryFactory extends java.lang.Object implements QueryFactory
An abstract implementation ofQueryFactory
.
-
-
Constructor Summary
Constructors Constructor Description AbstractQueryFactory()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description <T> Query<T>
createQuery(Datastore datastore)
Creates an unvalidatedQuery
typically for use in aggregation pipelines.<T> Query<T>
createQuery(Datastore datastore, com.mongodb.DBCollection collection, java.lang.Class<T> type)
Creates and returns aQuery
for the given arguments.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface dev.morphia.query.QueryFactory
createQuery
-
-
-
-
Method Detail
-
createQuery
public <T> Query<T> createQuery(Datastore datastore, com.mongodb.DBCollection collection, java.lang.Class<T> type)
Description copied from interface:QueryFactory
Creates and returns aQuery
for the given arguments. Default implementations of this method will simply delegate toQueryFactory.createQuery(Datastore, DBCollection, Class, DBObject)
with the last argument beingnull
.- Specified by:
createQuery
in interfaceQueryFactory
- Type Parameters:
T
- the type of the result- Parameters:
datastore
- the Datastore to usecollection
- the collection to querytype
- the type of the result- Returns:
- the query
- See Also:
QueryFactory.createQuery(Datastore, DBCollection, Class, DBObject)
-
createQuery
public <T> Query<T> createQuery(Datastore datastore)
Description copied from interface:QueryFactory
Creates an unvalidatedQuery
typically for use in aggregation pipelines.- Specified by:
createQuery
in interfaceQueryFactory
- Type Parameters:
T
- the type of the result- Parameters:
datastore
- the Datastore to use- Returns:
- the query
-
-