Module org.seasar.doma.core
Interface EntityQueryable<ENTITY>
- Type Parameters:
ENTITY- the type of the entity
- All Known Implementing Classes:
UnifiedSelectStarting,UnifiedSelectTerminal
Represents a queryable statement for entities.
Note: project(EntityMetamodel) and projectTo(EntityMetamodel, PropertyMetamodel[]) will remove duplicate entities from the results.
-
Method Summary
Modifier and TypeMethodDescription<ENTITY1,ENTITY2>
EntityQueryable<ENTITY>associate(EntityMetamodel<ENTITY1> first, EntityMetamodel<ENTITY2> second, BiConsumer<ENTITY1, ENTITY2> associator) Associates the entities.<ENTITY1,ENTITY2>
EntityQueryable<ENTITY>associate(EntityMetamodel<ENTITY1> first, EntityMetamodel<ENTITY2> second, BiConsumer<ENTITY1, ENTITY2> associator, AssociationOption option) Associates the entities with the option.<ENTITY1,ENTITY2>
EntityQueryable<ENTITY>associateWith(EntityMetamodel<ENTITY1> first, EntityMetamodel<ENTITY2> second, BiFunction<ENTITY1, ENTITY2, ENTITY1> associator) Associates the immutable entities.<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.distinct()Specifies the distinct keyword.distinct(DistinctOption distinctOption) Specifies the distinct keyword with the specified option.Specifies the for update clause.forUpdate(ForUpdateOption option) Specifies the for update clause with the specified option.innerJoin(EntityMetamodel<?> entityMetamodel, Consumer<JoinDeclaration> block) Specifies the inner join clause.leftJoin(EntityMetamodel<?> entityMetamodel, Consumer<JoinDeclaration> block) Specifies the left join clause.Specifies the limit clause.Specifies the offset clause.orderBy(Consumer<OrderByNameDeclaration> block) Specifies the order by clause.<RESULT> Listable<RESULT>project(EntityMetamodel<RESULT> entityMetamodel) Projects the result to the entity.<RESULT> Listable<RESULT>projectTo(EntityMetamodel<RESULT> entityMetamodel, PropertyMetamodel<?>... propertyMetamodels) Projects the result to the entity with the specified properties.where(Consumer<WhereDeclaration> block) Specifies the where clause.
-
Method Details
-
distinct
EntityQueryable<ENTITY> distinct()Specifies the distinct keyword.- Returns:
- the select statement
-
distinct
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 metamodelblock- 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 metamodelblock- 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
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 metamodelsecond- the second entity metamodelassociator- 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 metamodelsecond- the second entity metamodelassociator- the associatoroption- 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 metamodelsecond- the second entity metamodelassociator- 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 metamodelsecond- the second entity metamodelassociator- the associator- Returns:
- the select statement
-
project
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 metamodelpropertyMetamodels- the property metamodels to project- Returns:
- the select statement
-