Class EntityProjectionQuery<E extends BaseEntity,​R>

    • Constructor Summary

      Constructors 
      Constructor Description
      EntityProjectionQuery​(com.github.collinalpert.lambda2sql.functions.SqlFunction<E,​R> projection, EntityQuery<E> originalQuery)  
    • Method Summary

      Modifier and Type Method Description
      R[] toArray()
      Executes a new query and returns the result as an array.
      java.util.List<R> toList()
      Executes the query and returns the result as a List
      java.util.stream.Stream<R> toStream()
      Executes the query and returns the result as a Stream
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • EntityProjectionQuery

        public EntityProjectionQuery​(com.github.collinalpert.lambda2sql.functions.SqlFunction<E,​R> projection,
                                     EntityQuery<E> originalQuery)
    • Method Detail

      • toList

        public java.util.List<R> toList()
        Description copied from interface: Queryable
        Executes the query and returns the result as a List
        Specified by:
        toList in interface Queryable<E extends BaseEntity>
        Returns:
        A list of entities representing the result rows.
      • toStream

        public java.util.stream.Stream<R> toStream()
        Description copied from interface: Queryable
        Executes the query and returns the result as a Stream
        Specified by:
        toStream in interface Queryable<E extends BaseEntity>
        Returns:
        A list of entities representing the result rows.
      • toArray

        public R[] toArray()
        Description copied from interface: Queryable
        Executes a new query and returns the result as an array.
        Specified by:
        toArray in interface Queryable<E extends BaseEntity>
        Returns:
        An array of entities representing the result rows.