Interface EntityQueryable<ENTITY>

Type Parameters:
ENTITY - the type of the entity
All Superinterfaces:
Buildable<Statement<List<ENTITY>>>, Listable<ENTITY>, Statement<List<ENTITY>>
All Known Implementing Classes:
UnifiedSelectStarting, UnifiedSelectTerminal

public interface EntityQueryable<ENTITY> extends Listable<ENTITY>
Represents a queryable statement for entities.

Note: project(EntityMetamodel) and projectTo(EntityMetamodel, PropertyMetamodel[]) will remove duplicate entities from the results.

  • Method Details

    • distinct

      EntityQueryable<ENTITY> distinct()
      Specifies the distinct keyword.
      Returns:
      the select statement
    • distinct

      EntityQueryable<ENTITY> distinct(DistinctOption distinctOption)
      Specifies the distinct keyword with the specified option.
      Parameters:
      distinctOption - the distinct option
      Returns:
      the select statement
    • innerJoin

      EntityQueryable<ENTITY> innerJoin(EntityMetamodel<?> entityMetamodel, Consumer<JoinDeclaration> block)
      Specifies the inner join clause.
      Parameters:
      entityMetamodel - the entity metamodel
      block - the block that describes the join condition
      Returns:
      the select statement
    • leftJoin

      EntityQueryable<ENTITY> leftJoin(EntityMetamodel<?> entityMetamodel, Consumer<JoinDeclaration> block)
      Specifies the left join clause.
      Parameters:
      entityMetamodel - the entity metamodel
      block - the block that describes the join condition
      Returns:
      the select statement
    • where

      Specifies the where clause.
      Parameters:
      block - the block that describes the where condition
      Returns:
      the select statement
    • orderBy

      Specifies the order by clause.
      Parameters:
      block - the block that describes the order by condition
      Returns:
      the select statement
    • limit

      Specifies the limit clause.
      Parameters:
      limit - the limit
      Returns:
      the select statement
    • offset

      EntityQueryable<ENTITY> offset(Integer offset)
      Specifies the offset clause.
      Parameters:
      offset - the offset
      Returns:
      the select statement
    • forUpdate

      EntityQueryable<ENTITY> forUpdate()
      Specifies the for update clause.
      Returns:
      the select statement
    • forUpdate

      Specifies the for update clause with the specified option.
      Parameters:
      option - the for update option
      Returns:
      the select statement
    • associate

      <ENTITY1, ENTITY2> EntityQueryable<ENTITY> associate(EntityMetamodel<ENTITY1> first, EntityMetamodel<ENTITY2> second, BiConsumer<ENTITY1,ENTITY2> associator)
      Associates the entities.
      Parameters:
      first - the first entity metamodel
      second - the second entity metamodel
      associator - the associator
      Returns:
      the select statement
    • associate

      <ENTITY1, ENTITY2> EntityQueryable<ENTITY> associate(EntityMetamodel<ENTITY1> first, EntityMetamodel<ENTITY2> second, BiConsumer<ENTITY1,ENTITY2> associator, AssociationOption option)
      Associates the entities with the option.
      Parameters:
      first - the first entity metamodel
      second - the second entity metamodel
      associator - the associator
      option - the association option
      Returns:
      the select statement
    • associateWith

      <ENTITY1, ENTITY2> EntityQueryable<ENTITY> associateWith(EntityMetamodel<ENTITY1> first, EntityMetamodel<ENTITY2> second, BiFunction<ENTITY1,ENTITY2,ENTITY1> associator)
      Associates the immutable entities.
      Parameters:
      first - the first entity metamodel
      second - the second entity metamodel
      associator - the associator
      Returns:
      the select statement
    • associateWith

      <ENTITY1, ENTITY2> EntityQueryable<ENTITY> associateWith(EntityMetamodel<ENTITY1> first, EntityMetamodel<ENTITY2> second, BiFunction<ENTITY1,ENTITY2,ENTITY1> associator, AssociationOption option)
      Associates the immutable entities with the option.
      Parameters:
      first - the first entity metamodel
      second - the second entity metamodel
      associator - the associator
      Returns:
      the select statement
    • project

      <RESULT> Listable<RESULT> project(EntityMetamodel<RESULT> entityMetamodel)
      Projects the result to the entity. The duplicated entities are removed from the result.
      Parameters:
      entityMetamodel - the entity metamodel
      Returns:
      the select statement
    • projectTo

      <RESULT> Listable<RESULT> projectTo(EntityMetamodel<RESULT> entityMetamodel, PropertyMetamodel<?>... propertyMetamodels)
      Projects the result to the entity with the specified properties. The duplicated entities are removed from the result.
      Parameters:
      entityMetamodel - the entity metamodel
      propertyMetamodels - the property metamodels to project
      Returns:
      the select statement