Class UnifiedSelectStarting<ENTITY>

java.lang.Object
org.seasar.doma.jdbc.criteria.statement.AbstractStatement<UnifiedSelectStarting<ENTITY>,List<ENTITY>>
org.seasar.doma.jdbc.criteria.statement.UnifiedSelectStarting<ENTITY>
Type Parameters:
ENTITY - the type of the entity
All Implemented Interfaces:
Buildable<Statement<List<ENTITY>>>, EntityQueryable<ENTITY>, Listable<ENTITY>, SetOperand<ENTITY>, Statement<List<ENTITY>>, StreamMappable<ENTITY>

public class UnifiedSelectStarting<ENTITY> extends AbstractStatement<UnifiedSelectStarting<ENTITY>,List<ENTITY>> implements SetOperand<ENTITY>, EntityQueryable<ENTITY>
Represents a SELECT statement starting point.

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

  • Constructor Details

    • UnifiedSelectStarting

      public UnifiedSelectStarting(Config config, SelectFromDeclaration declaration, EntityMetamodel<ENTITY> entityMetamodel)
      Creates an instance.
      Parameters:
      config - the configuration
      declaration - the declaration
      entityMetamodel - the entity metamodel
  • Method Details

    • distinct

      public UnifiedSelectStarting<ENTITY> distinct()
      Description copied from interface: EntityQueryable
      Specifies the distinct keyword.
      Specified by:
      distinct in interface EntityQueryable<ENTITY>
      Returns:
      the select statement
    • distinct

      public UnifiedSelectStarting<ENTITY> distinct(DistinctOption distinctOption)
      Description copied from interface: EntityQueryable
      Specifies the distinct keyword with the specified option.
      Specified by:
      distinct in interface EntityQueryable<ENTITY>
      Parameters:
      distinctOption - the distinct option
      Returns:
      the select statement
    • innerJoin

      public UnifiedSelectStarting<ENTITY> innerJoin(EntityMetamodel<?> entityMetamodel, Consumer<JoinDeclaration> block)
      Description copied from interface: EntityQueryable
      Specifies the inner join clause.
      Specified by:
      innerJoin in interface EntityQueryable<ENTITY>
      Parameters:
      entityMetamodel - the entity metamodel
      block - the block that describes the join condition
      Returns:
      the select statement
    • leftJoin

      public UnifiedSelectStarting<ENTITY> leftJoin(EntityMetamodel<?> entityMetamodel, Consumer<JoinDeclaration> block)
      Description copied from interface: EntityQueryable
      Specifies the left join clause.
      Specified by:
      leftJoin in interface EntityQueryable<ENTITY>
      Parameters:
      entityMetamodel - the entity metamodel
      block - the block that describes the join condition
      Returns:
      the select statement
    • where

      Description copied from interface: EntityQueryable
      Specifies the where clause.
      Specified by:
      where in interface EntityQueryable<ENTITY>
      Parameters:
      block - the block that describes the where condition
      Returns:
      the select statement
    • orderBy

      Description copied from interface: EntityQueryable
      Specifies the order by clause.
      Specified by:
      orderBy in interface EntityQueryable<ENTITY>
      Parameters:
      block - the block that describes the order by condition
      Returns:
      the select statement
    • limit

      public UnifiedSelectStarting<ENTITY> limit(Integer limit)
      Description copied from interface: EntityQueryable
      Specifies the limit clause.
      Specified by:
      limit in interface EntityQueryable<ENTITY>
      Parameters:
      limit - the limit
      Returns:
      the select statement
    • offset

      public UnifiedSelectStarting<ENTITY> offset(Integer offset)
      Description copied from interface: EntityQueryable
      Specifies the offset clause.
      Specified by:
      offset in interface EntityQueryable<ENTITY>
      Parameters:
      offset - the offset
      Returns:
      the select statement
    • forUpdate

      public UnifiedSelectStarting<ENTITY> forUpdate()
      Description copied from interface: EntityQueryable
      Specifies the for update clause.
      Specified by:
      forUpdate in interface EntityQueryable<ENTITY>
      Returns:
      the select statement
    • forUpdate

      public UnifiedSelectStarting<ENTITY> forUpdate(ForUpdateOption option)
      Description copied from interface: EntityQueryable
      Specifies the for update clause with the specified option.
      Specified by:
      forUpdate in interface EntityQueryable<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: EntityQueryable
      Associates the entities.
      Specified by:
      associate in interface EntityQueryable<ENTITY>
      Parameters:
      first - the first entity metamodel
      second - the second entity metamodel
      associator - 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: EntityQueryable
      Associates the entities with the option.
      Specified by:
      associate in interface EntityQueryable<ENTITY>
      Parameters:
      first - the first entity metamodel
      second - the second entity metamodel
      associator - the associator
      option - 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: EntityQueryable
      Associates the immutable entities.
      Specified by:
      associateWith in interface EntityQueryable<ENTITY>
      Parameters:
      first - the first entity metamodel
      second - the second entity metamodel
      associator - 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: EntityQueryable
      Associates the immutable entities with the option.
      Specified by:
      associateWith in interface EntityQueryable<ENTITY>
      Parameters:
      first - the first entity metamodel
      second - the second entity metamodel
      associator - the associator
      Returns:
      the select statement
    • project

      public <RESULT> Listable<RESULT> project(EntityMetamodel<RESULT> entityMetamodel)
      Description copied from interface: EntityQueryable
      Projects the result to the entity. The duplicated entities are removed from the result.
      Specified by:
      project in interface EntityQueryable<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: EntityQueryable
      Projects the result to the entity with the specified properties. The duplicated entities are removed from the result.
      Specified by:
      projectTo in interface EntityQueryable<ENTITY>
      Parameters:
      entityMetamodel - the entity metamodel
      propertyMetamodels - the property metamodels to project
      Returns:
      the select statement
    • groupBy

      public NativeSqlSelectStarting<ENTITY> groupBy(PropertyMetamodel<?>... propertyMetamodels)
      Specifies the group by clause.
      Parameters:
      propertyMetamodels - the property metamodels to group by
      Returns:
      the select statement
    • having

      Specifies the having clause.
      Parameters:
      block - the block to declare the having condition
      Returns:
      the select statement
    • select

      public SetOperand<ENTITY> select()
      Projects the result to the entity. The duplicated entities are NOT removed from the result.
      Returns:
      the result
    • select

      public <T> SetOperand<T> select(EntityMetamodel<T> entityMetamodel)
      Projects the result to the specified entity. The duplicated entities are NOT removed from the result.
      Parameters:
      entityMetamodel - the entity metamodel to project
      Returns:
      the result
    • select

      public <T1, T2> SetOperand<Tuple2<T1,T2>> select(EntityMetamodel<T1> entityMetamodel1, EntityMetamodel<T2> entityMetamodel2)
      Projects the result to the specified entities. The duplicated entities are NOT removed from the result.
      Parameters:
      entityMetamodel1 - the first entity metamodel to project
      entityMetamodel2 - the second entity metamodel to project
      Returns:
      the result
    • select

      public <T1, T2, T3> SetOperand<Tuple3<T1,T2,T3>> select(EntityMetamodel<T1> entityMetamodel1, EntityMetamodel<T2> entityMetamodel2, EntityMetamodel<T3> entityMetamodel3)
      Projects the result to the specified entities. The duplicated entities are NOT removed from the result.
      Parameters:
      entityMetamodel1 - the first entity metamodel to project
      entityMetamodel2 - the second entity metamodel to project
      entityMetamodel3 - the third entity metamodel to project
      Returns:
      the result
    • select

      public <T1, T2, T3, T4> SetOperand<Tuple4<T1,T2,T3,T4>> select(EntityMetamodel<T1> entityMetamodel1, EntityMetamodel<T2> entityMetamodel2, EntityMetamodel<T3> entityMetamodel3, EntityMetamodel<T4> entityMetamodel4)
      Projects the result to the specified entities. The duplicated entities are NOT removed from the result.
      Parameters:
      entityMetamodel1 - the first entity metamodel to project
      entityMetamodel2 - the second entity metamodel to project
      entityMetamodel3 - the third entity metamodel to project
      entityMetamodel4 - the fourth entity metamodel to project
      Returns:
      the result
    • select

      public <T1, T2, T3, T4, T5> SetOperand<Tuple5<T1,T2,T3,T4,T5>> select(EntityMetamodel<T1> entityMetamodel1, EntityMetamodel<T2> entityMetamodel2, EntityMetamodel<T3> entityMetamodel3, EntityMetamodel<T4> entityMetamodel4, EntityMetamodel<T5> entityMetamodel5)
      Projects the result to the specified entities. The duplicated entities are NOT removed from the result.
      Parameters:
      entityMetamodel1 - the first entity metamodel to project
      entityMetamodel2 - the second entity metamodel to project
      entityMetamodel3 - the third entity metamodel to project
      entityMetamodel4 - the fourth entity metamodel to project
      entityMetamodel5 - the fifth entity metamodel to project
      Returns:
      the result
    • select

      public <T1, T2, T3, T4, T5, T6> SetOperand<Tuple6<T1,T2,T3,T4,T5,T6>> select(EntityMetamodel<T1> entityMetamodel1, EntityMetamodel<T2> entityMetamodel2, EntityMetamodel<T3> entityMetamodel3, EntityMetamodel<T4> entityMetamodel4, EntityMetamodel<T5> entityMetamodel5, EntityMetamodel<T6> entityMetamodel6)
      Projects the result to the specified entities. The duplicated entities are NOT removed from the result.
      Parameters:
      entityMetamodel1 - the first entity metamodel to project
      entityMetamodel2 - the second entity metamodel to project
      entityMetamodel3 - the third entity metamodel to project
      entityMetamodel4 - the fourth entity metamodel to project
      entityMetamodel5 - the fifth entity metamodel to project
      entityMetamodel6 - the sixth entity metamodel to project
      Returns:
      the result
    • select

      public <T1, T2, T3, T4, T5, T6, T7> SetOperand<Tuple7<T1,T2,T3,T4,T5,T6,T7>> select(EntityMetamodel<T1> entityMetamodel1, EntityMetamodel<T2> entityMetamodel2, EntityMetamodel<T3> entityMetamodel3, EntityMetamodel<T4> entityMetamodel4, EntityMetamodel<T5> entityMetamodel5, EntityMetamodel<T6> entityMetamodel6, EntityMetamodel<T7> entityMetamodel7)
      Projects the result to the specified entities. The duplicated entities are NOT removed from the result.
      Parameters:
      entityMetamodel1 - the first entity metamodel to project
      entityMetamodel2 - the second entity metamodel to project
      entityMetamodel3 - the third entity metamodel to project
      entityMetamodel4 - the fourth entity metamodel to project
      entityMetamodel5 - the fifth entity metamodel to project
      entityMetamodel6 - the sixth entity metamodel to project
      entityMetamodel7 - the seventh entity metamodel to project
      Returns:
      the result
    • select

      public <T1, T2, T3, T4, T5, T6, T7, T8> SetOperand<Tuple8<T1,T2,T3,T4,T5,T6,T7,T8>> select(EntityMetamodel<T1> entityMetamodel1, EntityMetamodel<T2> entityMetamodel2, EntityMetamodel<T3> entityMetamodel3, EntityMetamodel<T4> entityMetamodel4, EntityMetamodel<T5> entityMetamodel5, EntityMetamodel<T6> entityMetamodel6, EntityMetamodel<T7> entityMetamodel7, EntityMetamodel<T8> entityMetamodel8)
      Projects the result to the specified entities. The duplicated entities are NOT removed from the result.
      Parameters:
      entityMetamodel1 - the first entity metamodel to project
      entityMetamodel2 - the second entity metamodel to project
      entityMetamodel3 - the third entity metamodel to project
      entityMetamodel4 - the fourth entity metamodel to project
      entityMetamodel5 - the fifth entity metamodel to project
      entityMetamodel6 - the sixth entity metamodel to project
      entityMetamodel7 - the seventh entity metamodel to project
      entityMetamodel8 - the eighth entity metamodel to project
      Returns:
      the result
    • select

      public <T1, T2, T3, T4, T5, T6, T7, T8, T9> SetOperand<Tuple9<T1,T2,T3,T4,T5,T6,T7,T8,T9>> select(EntityMetamodel<T1> entityMetamodel1, EntityMetamodel<T2> entityMetamodel2, EntityMetamodel<T3> entityMetamodel3, EntityMetamodel<T4> entityMetamodel4, EntityMetamodel<T5> entityMetamodel5, EntityMetamodel<T6> entityMetamodel6, EntityMetamodel<T7> entityMetamodel7, EntityMetamodel<T8> entityMetamodel8, EntityMetamodel<T9> entityMetamodel9)
      Projects the result to the specified entities. The duplicated entities are NOT removed from the result.
      Parameters:
      entityMetamodel1 - the first entity metamodel to project
      entityMetamodel2 - the second entity metamodel to project
      entityMetamodel3 - the third entity metamodel to project
      entityMetamodel4 - the fourth entity metamodel to project
      entityMetamodel5 - the fifth entity metamodel to project
      entityMetamodel6 - the sixth entity metamodel to project
      entityMetamodel7 - the seventh entity metamodel to project
      entityMetamodel8 - the eighth entity metamodel to project
      entityMetamodel9 - the ninth entity metamodel to project
      Returns:
      the result
    • select

      public <T> SetOperand<T> select(PropertyMetamodel<T> propertyMetamodel)
      Projects the result with the specified property. The duplicated tuples are NOT removed from the result.
      Parameters:
      propertyMetamodel - the property metamodel to project
      Returns:
      the result
    • select

      public <T1, T2> SetOperand<Tuple2<T1,T2>> select(PropertyMetamodel<T1> propertyMetamodel1, PropertyMetamodel<T2> propertyMetamodel2)
      Projects the result with the specified properties. The duplicated tuples are NOT removed from the result.
      Parameters:
      propertyMetamodel1 - the first property metamodel to project
      propertyMetamodel2 - the second property metamodel to project
      Returns:
      the result
    • select

      public <T1, T2, T3> SetOperand<Tuple3<T1,T2,T3>> select(PropertyMetamodel<T1> propertyMetamodel1, PropertyMetamodel<T2> propertyMetamodel2, PropertyMetamodel<T3> propertyMetamodel3)
      Projects the result with the specified properties. The duplicated tuples are NOT removed from the result.
      Parameters:
      propertyMetamodel1 - the first property metamodel to project
      propertyMetamodel2 - the second property metamodel to project
      propertyMetamodel3 - the third property metamodel to project
      Returns:
      the result
    • select

      public <T1, T2, T3, T4> SetOperand<Tuple4<T1,T2,T3,T4>> select(PropertyMetamodel<T1> propertyMetamodel1, PropertyMetamodel<T2> propertyMetamodel2, PropertyMetamodel<T3> propertyMetamodel3, PropertyMetamodel<T4> propertyMetamodel4)
      Projects the result with the specified properties. The duplicated tuples are NOT removed from the result.
      Parameters:
      propertyMetamodel1 - the first property metamodel to project
      propertyMetamodel2 - the second property metamodel to project
      propertyMetamodel3 - the third property metamodel to project
      propertyMetamodel4 - the fourth property metamodel to project
      Returns:
      the result
    • select

      public <T1, T2, T3, T4, T5> SetOperand<Tuple5<T1,T2,T3,T4,T5>> select(PropertyMetamodel<T1> propertyMetamodel1, PropertyMetamodel<T2> propertyMetamodel2, PropertyMetamodel<T3> propertyMetamodel3, PropertyMetamodel<T4> propertyMetamodel4, PropertyMetamodel<T5> propertyMetamodel5)
      Projects the result with the specified properties. The duplicated tuples are NOT removed from the result.
      Parameters:
      propertyMetamodel1 - the first property metamodel to project
      propertyMetamodel2 - the second property metamodel to project
      propertyMetamodel3 - the third property metamodel to project
      propertyMetamodel4 - the fourth property metamodel to project
      propertyMetamodel5 - the fifth property metamodel to project
      Returns:
      the result
    • select

      public <T1, T2, T3, T4, T5, T6> SetOperand<Tuple6<T1,T2,T3,T4,T5,T6>> select(PropertyMetamodel<T1> propertyMetamodel1, PropertyMetamodel<T2> propertyMetamodel2, PropertyMetamodel<T3> propertyMetamodel3, PropertyMetamodel<T4> propertyMetamodel4, PropertyMetamodel<T5> propertyMetamodel5, PropertyMetamodel<T6> propertyMetamodel6)
      Projects the result with the specified properties. The duplicated tuples are NOT removed from the result.
      Parameters:
      propertyMetamodel1 - the first property metamodel to project
      propertyMetamodel2 - the second property metamodel to project
      propertyMetamodel3 - the third property metamodel to project
      propertyMetamodel4 - the fourth property metamodel to project
      propertyMetamodel5 - the fifth property metamodel to project
      propertyMetamodel6 - the sixth property metamodel to project
      Returns:
      the result
    • select

      public <T1, T2, T3, T4, T5, T6, T7> SetOperand<Tuple7<T1,T2,T3,T4,T5,T6,T7>> select(PropertyMetamodel<T1> propertyMetamodel1, PropertyMetamodel<T2> propertyMetamodel2, PropertyMetamodel<T3> propertyMetamodel3, PropertyMetamodel<T4> propertyMetamodel4, PropertyMetamodel<T5> propertyMetamodel5, PropertyMetamodel<T6> propertyMetamodel6, PropertyMetamodel<T7> propertyMetamodel7)
      Projects the result with the specified properties. The duplicated tuples are NOT removed from the result.
      Parameters:
      propertyMetamodel1 - the first property metamodel to project
      propertyMetamodel2 - the second property metamodel to project
      propertyMetamodel3 - the third property metamodel to project
      propertyMetamodel4 - the fourth property metamodel to project
      propertyMetamodel5 - the fifth property metamodel to project
      propertyMetamodel6 - the sixth property metamodel to project
      propertyMetamodel7 - the seventh property metamodel to project
      Returns:
      the result
    • select

      public <T1, T2, T3, T4, T5, T6, T7, T8> SetOperand<Tuple8<T1,T2,T3,T4,T5,T6,T7,T8>> select(PropertyMetamodel<T1> propertyMetamodel1, PropertyMetamodel<T2> propertyMetamodel2, PropertyMetamodel<T3> propertyMetamodel3, PropertyMetamodel<T4> propertyMetamodel4, PropertyMetamodel<T5> propertyMetamodel5, PropertyMetamodel<T6> propertyMetamodel6, PropertyMetamodel<T7> propertyMetamodel7, PropertyMetamodel<T8> propertyMetamodel8)
      Projects the result with the specified properties. The duplicated tuples are NOT removed from the result.
      Parameters:
      propertyMetamodel1 - the first property metamodel to project
      propertyMetamodel2 - the second property metamodel to project
      propertyMetamodel3 - the third property metamodel to project
      propertyMetamodel4 - the fourth property metamodel to project
      propertyMetamodel5 - the fifth property metamodel to project
      propertyMetamodel6 - the sixth property metamodel to project
      propertyMetamodel7 - the seventh property metamodel to project
      propertyMetamodel8 - the eighth property metamodel to project
      Returns:
      the result
    • select

      public <T1, T2, T3, T4, T5, T6, T7, T8, T9> SetOperand<Tuple9<T1,T2,T3,T4,T5,T6,T7,T8,T9>> select(PropertyMetamodel<T1> propertyMetamodel1, PropertyMetamodel<T2> propertyMetamodel2, PropertyMetamodel<T3> propertyMetamodel3, PropertyMetamodel<T4> propertyMetamodel4, PropertyMetamodel<T5> propertyMetamodel5, PropertyMetamodel<T6> propertyMetamodel6, PropertyMetamodel<T7> propertyMetamodel7, PropertyMetamodel<T8> propertyMetamodel8, PropertyMetamodel<T9> propertyMetamodel9)
      Projects the result with the specified properties. The duplicated tuples are NOT removed from the result.
      Parameters:
      propertyMetamodel1 - the first property metamodel to project
      propertyMetamodel2 - the second property metamodel to project
      propertyMetamodel3 - the third property metamodel to project
      propertyMetamodel4 - the fourth property metamodel to project
      propertyMetamodel5 - the fifth property metamodel to project
      propertyMetamodel6 - the sixth property metamodel to project
      propertyMetamodel7 - the seventh property metamodel to project
      propertyMetamodel8 - the eighth property metamodel to project
      propertyMetamodel9 - the ninth property metamodel to project
      Returns:
      the result
    • select

      public SetOperand<Row> select(PropertyMetamodel<?> propertyMetamodel, PropertyMetamodel<?>... propertyMetamodels)
      Projects the result as a List of Row implicitly with the specified properties. The duplicated rows are NOT removed from the result.
      Parameters:
      propertyMetamodels - the property metamodels to project
      Returns:
      the result
    • selectAsRow

      public SetOperand<Row> selectAsRow(PropertyMetamodel<?> propertyMetamodel, PropertyMetamodel<?>... propertyMetamodels)
      Projects the result as a List of Row explicitly with the specified properties. The duplicated rows are NOT removed from the result.
      Parameters:
      propertyMetamodels - the property metamodels to project
      Returns:
      the result
    • selectTo

      public <RESULT> SetOperand<RESULT> selectTo(EntityMetamodel<RESULT> entityMetamodel, PropertyMetamodel<?>... propertyMetamodels)
      Projects the result to the entity. The duplicated entities are NOT removed from the result.
      Returns:
      the result
    • openStream

      public Stream<ENTITY> openStream()
      Description copied from interface: StreamMappable
      Open a stream.

      You must close the stream after using it.

      Specified by:
      openStream in interface StreamMappable<ENTITY>
      Returns:
      the opened stream
    • mapStream

      public <RESULT> RESULT mapStream(Function<Stream<ENTITY>,RESULT> streamMapper)
      Description copied from interface: StreamMappable
      Map a stream.
      Specified by:
      mapStream in interface StreamMappable<ENTITY>
      Type Parameters:
      RESULT - the mapped result
      Parameters:
      streamMapper - the mapper
      Returns:
      the mapped result
    • getContext

      public SetOperationContext<ENTITY> getContext()
      Description copied from interface: SetOperand
      Returns the set operation context
      Specified by:
      getContext in interface SetOperand<ENTITY>
      Returns:
      the context
    • union

      public SetOperator<ENTITY> union(SetOperand<ENTITY> other)
      Description copied from interface: SetOperand
      Creates an UNION statement
      Specified by:
      union in interface SetOperand<ENTITY>
      Parameters:
      other - the UNION operand
      Returns:
      the UNION operator
    • unionAll

      public SetOperator<ENTITY> unionAll(SetOperand<ENTITY> other)
      Description copied from interface: SetOperand
      Creates an UNION ALL statement
      Specified by:
      unionAll in interface SetOperand<ENTITY>
      Parameters:
      other - the UNION ALL operand
      Returns:
      the UNION ALL operator
    • createCommand

      protected Command<List<ENTITY>> createCommand()
      Specified by:
      createCommand in class AbstractStatement<UnifiedSelectStarting<ENTITY>,List<ENTITY>>