Module org.seasar.doma.core
Class UnifiedSelectTerminal<ENTITY>
java.lang.Object
org.seasar.doma.jdbc.criteria.statement.AbstractStatement<UnifiedSelectTerminal<ENTITY>,List<ENTITY>>
org.seasar.doma.jdbc.criteria.statement.UnifiedSelectTerminal<ENTITY>
- Type Parameters:
ENTITY- the type of the entity
- All Implemented Interfaces:
Buildable<Statement<List<ENTITY>>>,EntityQueryable<ENTITY>,Listable<ENTITY>,Statement<List<ENTITY>>
public class UnifiedSelectTerminal<ENTITY>
extends AbstractStatement<UnifiedSelectTerminal<ENTITY>,List<ENTITY>>
implements EntityQueryable<ENTITY>
Represents a SELECT statement terminal.
Note: project(EntityMetamodel) and projectTo(EntityMetamodel, PropertyMetamodel[]) will remove duplicate entities from the results.
-
Field Summary
Fields inherited from class org.seasar.doma.jdbc.criteria.statement.AbstractStatement
config, EXECUTE_METHOD, EXECUTE_METHOD_NAME -
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.Methods inherited from class org.seasar.doma.jdbc.criteria.statement.AbstractStatement
asSql, createCommenter, execute, peekMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Method Details
-
distinct
Description copied from interface:EntityQueryableSpecifies the distinct keyword.- Specified by:
distinctin interfaceEntityQueryable<ENTITY>- Returns:
- the select statement
-
distinct
Description copied from interface:EntityQueryableSpecifies the distinct keyword with the specified option.- Specified by:
distinctin interfaceEntityQueryable<ENTITY>- Parameters:
distinctOption- the distinct option- Returns:
- the select statement
-
innerJoin
public EntityQueryable<ENTITY> innerJoin(EntityMetamodel<?> entityMetamodel, Consumer<JoinDeclaration> block) Description copied from interface:EntityQueryableSpecifies the inner join clause.- Specified by:
innerJoinin interfaceEntityQueryable<ENTITY>- Parameters:
entityMetamodel- the entity metamodelblock- the block that describes the join condition- Returns:
- the select statement
-
leftJoin
public EntityQueryable<ENTITY> leftJoin(EntityMetamodel<?> entityMetamodel, Consumer<JoinDeclaration> block) Description copied from interface:EntityQueryableSpecifies the left join clause.- Specified by:
leftJoinin interfaceEntityQueryable<ENTITY>- Parameters:
entityMetamodel- the entity metamodelblock- the block that describes the join condition- Returns:
- the select statement
-
where
Description copied from interface:EntityQueryableSpecifies the where clause.- Specified by:
wherein interfaceEntityQueryable<ENTITY>- Parameters:
block- the block that describes the where condition- Returns:
- the select statement
-
orderBy
Description copied from interface:EntityQueryableSpecifies the order by clause.- Specified by:
orderByin interfaceEntityQueryable<ENTITY>- Parameters:
block- the block that describes the order by condition- Returns:
- the select statement
-
limit
Description copied from interface:EntityQueryableSpecifies the limit clause.- Specified by:
limitin interfaceEntityQueryable<ENTITY>- Parameters:
limit- the limit- Returns:
- the select statement
-
offset
Description copied from interface:EntityQueryableSpecifies the offset clause.- Specified by:
offsetin interfaceEntityQueryable<ENTITY>- Parameters:
offset- the offset- Returns:
- the select statement
-
forUpdate
Description copied from interface:EntityQueryableSpecifies the for update clause.- Specified by:
forUpdatein interfaceEntityQueryable<ENTITY>- Returns:
- the select statement
-
forUpdate
Description copied from interface:EntityQueryableSpecifies the for update clause with the specified option.- Specified by:
forUpdatein interfaceEntityQueryable<ENTITY>- Parameters:
option- the for update option- Returns:
- the select statement
-
associate
public <ENTITY1,ENTITY2> EntityQueryable<ENTITY> associate(EntityMetamodel<ENTITY1> first, EntityMetamodel<ENTITY2> second, BiConsumer<ENTITY1, ENTITY2> associator) Description copied from interface:EntityQueryableAssociates the entities.- Specified by:
associatein interfaceEntityQueryable<ENTITY>- Parameters:
first- the first entity metamodelsecond- the second entity metamodelassociator- the associator- Returns:
- the select statement
-
associate
public <ENTITY1,ENTITY2> EntityQueryable<ENTITY> associate(EntityMetamodel<ENTITY1> first, EntityMetamodel<ENTITY2> second, BiConsumer<ENTITY1, ENTITY2> associator, AssociationOption option) Description copied from interface:EntityQueryableAssociates the entities with the option.- Specified by:
associatein interfaceEntityQueryable<ENTITY>- Parameters:
first- the first entity metamodelsecond- the second entity metamodelassociator- the associatoroption- the association option- Returns:
- the select statement
-
associateWith
public <ENTITY1,ENTITY2> EntityQueryable<ENTITY> associateWith(EntityMetamodel<ENTITY1> first, EntityMetamodel<ENTITY2> second, BiFunction<ENTITY1, ENTITY2, ENTITY1> associator) Description copied from interface:EntityQueryableAssociates the immutable entities.- Specified by:
associateWithin interfaceEntityQueryable<ENTITY>- Parameters:
first- the first entity metamodelsecond- the second entity metamodelassociator- the associator- Returns:
- the select statement
-
associateWith
public <ENTITY1,ENTITY2> EntityQueryable<ENTITY> associateWith(EntityMetamodel<ENTITY1> first, EntityMetamodel<ENTITY2> second, BiFunction<ENTITY1, ENTITY2, ENTITY1> associator, AssociationOption option) Description copied from interface:EntityQueryableAssociates the immutable entities with the option.- Specified by:
associateWithin interfaceEntityQueryable<ENTITY>- Parameters:
first- the first entity metamodelsecond- the second entity metamodelassociator- the associator- Returns:
- the select statement
-
project
Description copied from interface:EntityQueryableProjects the result to the entity. The duplicated entities are removed from the result.- Specified by:
projectin interfaceEntityQueryable<ENTITY>- Parameters:
entityMetamodel- the entity metamodel- Returns:
- the select statement
-
projectTo
public <RESULT> Listable<RESULT> projectTo(EntityMetamodel<RESULT> entityMetamodel, PropertyMetamodel<?>... propertyMetamodels) Description copied from interface:EntityQueryableProjects the result to the entity with the specified properties. The duplicated entities are removed from the result.- Specified by:
projectToin interfaceEntityQueryable<ENTITY>- Parameters:
entityMetamodel- the entity metamodelpropertyMetamodels- the property metamodels to project- Returns:
- the select statement
-
createCommand
- Specified by:
createCommandin classAbstractStatement<UnifiedSelectTerminal<ENTITY>,List<ENTITY>>
-