Class SelectQuery<T>

  • Type Parameters:
    T - type of entity this select will return

    public class SelectQuery<T>
    extends Object
    Specifies a SELECT operation, possibly with joins, where clause, limit and order by clause.
    Author:
    Guillaume Le Cousin
    • Method Detail

      • from

        public static <T> SelectQuery<T> from​(Class<T> type,
                                              String alias)
        Create a SELECT query from the table of the given entity type, using the given alias.
      • join

        public SelectQuery<T> join​(String entityName,
                                   String propertyName,
                                   String alias)
        Create a join, using the link entityName.propertyName, and using the given alias as the joined entity name.
      • where

        public SelectQuery<T> where​(Criteria criteria)
        Set the given criteria in the where clause. If criteria already exist, a AND is created between the existing criteria and the new criteria.
      • limit

        public SelectQuery<T> limit​(long start,
                                    long count)
        Apply a limit and offset to the select query.
      • orderBy

        public SelectQuery<T> orderBy​(String entityName,
                                      String propertyName,
                                      boolean ascending)
        Add an ORDER BY clause to this select query.
      • executeCount

        public reactor.core.publisher.Mono<Long> executeCount​(LcReactiveDataRelationalClient client)
        Execute a COUNT request, using the joins and where clause of this select query. Any join which are not useful (not used for conditions) are automatically ignored.