Interface QueryFactory

    • Method Detail

      • createQuery

        <T> Query<T> createQuery​(Datastore datastore,
                                 Class<T> type)
        Creates and returns a Query for the given arguments. Default implementations of this method will simply delegate to createQuery(Datastore, Class) with the last argument being null.
        Type Parameters:
        T - the type of the result
        Parameters:
        datastore - the Datastore to use
        type - the type of the result
        Returns:
        the query
      • createQuery

        <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) 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
      • createQuery

        <T> Query<T> createQuery​(Datastore datastore,
                                 Class<T> type,
                                 org.bson.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

        <T> Query<T> createQuery​(Datastore datastore)
        Creates an unvalidated Query typically for use in aggregation pipelines.
        Type Parameters:
        T - the type of the result
        Parameters:
        datastore - the Datastore to use
        Returns:
        the query