Interface QueryFactory

All Known Implementing Classes:
DefaultQueryFactory

@MorphiaInternal public interface QueryFactory
A factory for queries.
See Also:
Developer note.
This is an internal item. Its function and presence are subject to change without warning. Its use is highly discouraged.
  • Method Details

    • createQuery

      default <T> Query<T> createQuery(Datastore datastore, Class<T> type, FindOptions options)
      Creates a new query for the given type.
      Type Parameters:
      T - the query type
      Parameters:
      datastore - the datastore
      type - the query type
      Returns:
      the new query
    • createQuery

      <T> Query<T> createQuery(Datastore datastore, Class<T> type, FindOptions options, @Nullable Document query)
      Creates and returns a Query for the given arguments. The last argument is optional and may be null.
      Type Parameters:
      T - the type of the result
      Parameters:
      datastore - the Datastore to use
      type - the type of the result
      query - the Document containing the query structure
      Returns:
      the query
    • createQuery

      default <T> Query<T> createQuery(Datastore datastore, String collection, Class<T> type)
      Creates and returns a Query for the given arguments. Default implementations of this method will simply delegate to createQuery(Datastore, Class, FindOptions) with the last argument being null.
      Type Parameters:
      T - the type of the result
      Parameters:
      datastore - the Datastore to use
      collection - the actual collection to query. This overrides any mapped on collection on type.
      type - the type of the result
      Returns:
      the query
      See Also: