Interface QueryFactory

    • Method Detail

      • 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
        See Also:
        createQuery(Datastore, Class)
      • createQuery

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

        @Deprecated(forRemoval=true)
        default <T> Query<T> createQuery​(Datastore datastore)
        Deprecated, for removal: This API element is subject to removal in a future version.
        this method is no longer used
        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