Class AsyncSingleEntityQuery<E extends BaseEntity>

    • Constructor Detail

      • AsyncSingleEntityQuery

        public AsyncSingleEntityQuery​(java.lang.Class<E> type)
    • Method Detail

      • where

        public AsyncSingleEntityQuery<E> where​(com.github.collinalpert.lambda2sql.functions.SqlPredicate<E> predicate)
        Sets or appends a WHERE clause for the DQL statement.
        Overrides:
        where in class SingleEntityQuery<E extends BaseEntity>
        Parameters:
        predicate - The predicate describing the WHERE clause.
        Returns:
        This EntityQuery object, now with an (appended) WHERE clause.
      • orWhere

        public AsyncSingleEntityQuery<E> orWhere​(com.github.collinalpert.lambda2sql.functions.SqlPredicate<E> predicate)
        Sets or appends an OR WHERE clause to the DQL statement.
        Overrides:
        orWhere in class SingleEntityQuery<E extends BaseEntity>
        Parameters:
        predicate - The predicate describing the OR WHERE clause.
        Returns:
        This EntityQuery object, now with an (appended) OR WHERE clause.
      • project

        public <R> AsyncSingleQueryable<R> project​(com.github.collinalpert.lambda2sql.functions.SqlFunction<E,​R> projection)
        Selects only a single column from a table. This is meant if you don't want to fetch an entire entity from the database.
        Overrides:
        project in class SingleEntityQuery<E extends BaseEntity>
        Type Parameters:
        R - The type of the column you want to retrieve.
        Parameters:
        projection - The column to project to.
        Returns:
        A queryable containing the projection.