java.lang.Object
org.litebridge.orm.api.select.impl.DelegatingSelectTerminal<DTO>
org.litebridge.orm.api.select.impl.LimitClauseTerminalImpl<DTO>
org.litebridge.orm.api.select.impl.OrderByClauseTerminalImpl<DTO>
org.litebridge.orm.api.select.impl.AbstractGroupByClauseTerminal<DTO,DtoHavingConditionClause<DTO>,DtoHavingConditionClauseTerminal<DTO>,DtoQueryConditionBuilder<DTO>,DtoOrderByClause<DTO>,DtoOrderByClauseChain<DTO>>
org.litebridge.orm.api.select.dto.DtoGroupByClauseTerminal<DTO>
- Type Parameters:
DTO- the type of the DTO
- All Implemented Interfaces:
GroupByClauseTerminal<DTO,,DtoHavingConditionClause<DTO>, DtoHavingConditionClauseTerminal<DTO>, DtoQueryConditionBuilder<DTO>, DtoOrderByClause<DTO>, DtoOrderByClauseChain<DTO>> HavingClauseTerminal<DTO,,DtoOrderByClause<DTO>, DtoOrderByClauseChain<DTO>> LimitClauseTerminal<DTO>,OrderByClauseTerminal<DTO>,SelectTerminal<DTO>
public final class DtoGroupByClauseTerminal<DTO>
extends AbstractGroupByClauseTerminal<DTO,DtoHavingConditionClause<DTO>,DtoHavingConditionClauseTerminal<DTO>,DtoQueryConditionBuilder<DTO>,DtoOrderByClause<DTO>,DtoOrderByClauseChain<DTO>>
Terminal clause for DTO GROUP BY clauses.
-
Field Summary
Fields inherited from class org.litebridge.orm.api.select.impl.DelegatingSelectTerminal
litebridgeContext, node, pendingNode, selectEngineTerminal -
Constructor Summary
ConstructorsConstructorDescriptionDtoGroupByClauseTerminal(String[] fields, QueryNode node, SelectEngineTerminal selectEngineTerminal, LitebridgeContext litebridgeContext) Creates a newDtoGroupByClauseTerminalinstance using field names.DtoGroupByClauseTerminal(ExpressionSpec[] expressions, QueryNode node, SelectEngineTerminal selectEngineTerminal, LitebridgeContext litebridgeContext) Creates a newDtoGroupByClauseTerminalinstance using expressions. -
Method Summary
Modifier and TypeMethodDescriptionhaving(ExpressionSpec expression) Starts a HAVING clause for the SQL query.Adds an ORDER BY clause to the query, specifying the expressions to sort the results by.orderBy(ExpressionSpec... expressions) Adds an ORDER BY clause to the query, specifying the fields and expressions to sort the results by.Methods inherited from class org.litebridge.orm.api.select.impl.OrderByClauseTerminalImpl
limitMethods inherited from class org.litebridge.orm.api.select.impl.LimitClauseTerminalImpl
offsetMethods inherited from class org.litebridge.orm.api.select.impl.DelegatingSelectTerminal
first, firstOrNull, firstOrThrow, firstOrThrow, list, litebridgeContext, node, one, oneOrNull, oneOrThrow, oneOrThrow, stream, toSqlMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.litebridge.orm.api.select.LimitClauseTerminal
offsetMethods inherited from interface org.litebridge.orm.api.select.OrderByClauseTerminal
limitMethods inherited from interface org.litebridge.orm.api.select.SelectTerminal
first, firstOrNull, firstOrThrow, firstOrThrow, list, one, oneOrNull, oneOrThrow, oneOrThrow, stream, toSql
-
Constructor Details
-
DtoGroupByClauseTerminal
public DtoGroupByClauseTerminal(ExpressionSpec[] expressions, QueryNode node, SelectEngineTerminal selectEngineTerminal, LitebridgeContext litebridgeContext) Creates a newDtoGroupByClauseTerminalinstance using expressions.- Parameters:
expressions- the group-by expressionsnode- the current query nodeselectEngineTerminal- the terminal select enginelitebridgeContext- the Litebridge context
-
DtoGroupByClauseTerminal
public DtoGroupByClauseTerminal(String[] fields, QueryNode node, SelectEngineTerminal selectEngineTerminal, LitebridgeContext litebridgeContext) Creates a newDtoGroupByClauseTerminalinstance using field names.- Parameters:
fields- the group-by field namesnode- the current query nodeselectEngineTerminal- the terminal select enginelitebridgeContext- the Litebridge context
-
-
Method Details
-
having
Description copied from interface:GroupByClauseTerminalStarts a HAVING clause for the SQL query.- Parameters:
expression- the expression to apply the filtering condition on- Returns:
- an instance of
HCCrepresenting the next stage of the having condition clause
-
orderBy
Description copied from interface:HavingClauseTerminalAdds an ORDER BY clause to the query, specifying the expressions to sort the results by.- Parameters:
fields- the expressions that determine the order of the results. Each column must be valid for the associated table or view in the query. The order in which the expressions are specified determines the priority of ordering.- Returns:
- an instance of the type representing the ORDER BY clause, allowing further specification of ordering or transitioning to the next query stage.
-
orderBy
Description copied from interface:HavingClauseTerminalAdds an ORDER BY clause to the query, specifying the fields and expressions to sort the results by.- Parameters:
expressions- the expressions that determine the order of the results.- Returns:
- an instance of the type representing the ORDER BY clause, allowing further specification of ordering or transitioning to the next query stage.
-