java.lang.Object
org.litebridgedb.orm.api.select.impl.DelegatingSelector<DTO,DtoSelectSpec>
org.litebridgedb.orm.api.select.impl.LimitClauseTerminalImpl<DTO,DtoSelectSpec>
org.litebridgedb.orm.api.select.impl.OrderByClauseTerminalImpl<DTO,DtoSelectSpec>
org.litebridgedb.orm.api.select.impl.AbstractWhereClauseTerminal<DTO,DtoGroupByClauseTerminal<DTO>,DtoHavingConditionClause<DTO>,DtoHavingConditionClauseTerminal<DTO>,DtoOrderByClause<DTO>,DtoOrderByClauseChain<DTO>,DtoSelectSpec>
org.litebridgedb.orm.api.select.impl.AbstractJoinClauseTerminal<DTO,DtoJoinClause<DTO>,DtoJoinConditionClause<DTO>,DtoJoinConditionClauseTerminal<DTO>,DtoWhereConditionClause<DTO>,DtoWhereConditionClauseTerminal<DTO>,DtoGroupByClauseTerminal<DTO>,DtoHavingConditionClause<DTO>,DtoHavingConditionClauseTerminal<DTO>,DtoOrderByClause<DTO>,DtoOrderByClauseChain<DTO>,DtoSelectSpec>
org.litebridgedb.orm.api.select.impl.AbstractFromClauseTerminal<DTO,DtoJoinClause<DTO>,DtoJoinConditionClause<DTO>,DtoJoinConditionClauseTerminal<DTO>,DtoWhereConditionClause<DTO>,DtoWhereConditionClauseTerminal<DTO>,DtoGroupByClauseTerminal<DTO>,DtoHavingConditionClause<DTO>,DtoHavingConditionClauseTerminal<DTO>,DtoOrderByClause<DTO>,DtoOrderByClauseChain<DTO>,DtoSelectSpec>
org.litebridgedb.orm.api.dto.DtoFromClauseTerminal<DTO>
- All Implemented Interfaces:
DtoJoinClassTerminal<DTO>,FromClauseTerminal<DTO,,DtoJoinClause<DTO>, DtoJoinConditionClause<DTO>, DtoJoinConditionClauseTerminal<DTO>, DtoWhereConditionClause<DTO>, DtoWhereConditionClauseTerminal<DTO>, DtoGroupByClauseTerminal<DTO>, DtoHavingConditionClause<DTO>, DtoHavingConditionClauseTerminal<DTO>, DtoOrderByClause<DTO>, DtoOrderByClauseChain<DTO>> JoinClauseTerminal<DTO,,DtoJoinClause<DTO>, DtoJoinConditionClause<DTO>, DtoJoinConditionClauseTerminal<DTO>, DtoWhereConditionClause<DTO>, DtoWhereConditionClauseTerminal<DTO>, DtoGroupByClauseTerminal<DTO>, DtoHavingConditionClause<DTO>, DtoHavingConditionClauseTerminal<DTO>, DtoOrderByClause<DTO>, DtoOrderByClauseChain<DTO>> LimitClauseTerminal<DTO>,OrderByClauseTerminal<DTO>,SelectTerminal<DTO>,WhereClauseTerminal<DTO,DtoGroupByClauseTerminal<DTO>, DtoHavingConditionClause<DTO>, DtoHavingConditionClauseTerminal<DTO>, DtoOrderByClause<DTO>, DtoOrderByClauseChain<DTO>>
public final class DtoFromClauseTerminal<DTO>
extends org.litebridgedb.orm.api.select.impl.AbstractFromClauseTerminal<DTO,DtoJoinClause<DTO>,DtoJoinConditionClause<DTO>,DtoJoinConditionClauseTerminal<DTO>,DtoWhereConditionClause<DTO>,DtoWhereConditionClauseTerminal<DTO>,DtoGroupByClauseTerminal<DTO>,DtoHavingConditionClause<DTO>,DtoHavingConditionClauseTerminal<DTO>,DtoOrderByClause<DTO>,DtoOrderByClauseChain<DTO>,DtoSelectSpec>
implements DtoJoinClassTerminal<DTO>
-
Field Summary
Fields inherited from class org.litebridgedb.orm.api.select.impl.LimitClauseTerminalImpl
selectSpecFields inherited from class org.litebridgedb.orm.api.select.impl.DelegatingSelector
delegate -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionAdds a GROUP BY clause to the query, specifying the column(s) to group the results by.groupBy(ExpressionSpec... fields) Adds a GROUP BY clause to the query, specifying the expressions to group the results by.Adds an ORDER BY clause to the query, specifying the expressions to sort the results by.orderBy(ExpressionSpec... fields) Adds an ORDER BY clause to the query, specifying the fields and expressions to sort the results by.Starts a WHERE clause for the SQL query.where(ExpressionSpec expression) Convenience method to select a DTO by its primary key.@Nullable DTOwithIdOrNull(Object id) Convenience method to select a DTO by its primary key.withIdOrThrow(Object id) Retrieves a DTO by its primary key and throws an exception if no matching entry is found.withIdOrThrow(Object id, Supplier<? extends X> exceptionSupplier) Retrieves a DTO by its primary key and throws the specified exception if no matching entry is found.Methods inherited from class org.litebridgedb.orm.api.select.impl.OrderByClauseTerminalImpl
limitMethods inherited from class org.litebridgedb.orm.api.select.impl.LimitClauseTerminalImpl
offset, selectSpecMethods inherited from class org.litebridgedb.orm.api.select.impl.DelegatingSelector
first, firstOrNull, firstOrThrow, firstOrThrow, list, 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.litebridgedb.orm.api.select.LimitClauseTerminal
offsetMethods inherited from interface org.litebridgedb.orm.api.select.OrderByClauseTerminal
limitMethods inherited from interface org.litebridgedb.orm.api.select.SelectTerminal
first, firstOrNull, firstOrThrow, firstOrThrow, list, one, oneOrNull, oneOrThrow, oneOrThrow, stream, toSql
-
Constructor Details
-
DtoFromClauseTerminal
-
-
Method Details
-
where
Description copied from interface:JoinClauseTerminalStarts a WHERE clause for the SQL query.Adds a filtering condition to the SQL query based on the specified column. This method is part of a fluent API for building SQL queries and transitions to the next stage where additional filtering conditions can be specified.
- Specified by:
wherein interfaceJoinClauseTerminal<DTO,DtoJoinClause<DTO>, DtoJoinConditionClause<DTO>, DtoJoinConditionClauseTerminal<DTO>, DtoWhereConditionClause<DTO>, DtoWhereConditionClauseTerminal<DTO>, DtoGroupByClauseTerminal<DTO>, DtoHavingConditionClause<DTO>, DtoHavingConditionClauseTerminal<DTO>, DtoOrderByClause<DTO>, DtoOrderByClauseChain<DTO>> - Parameters:
field- the name of the column to apply the filtering condition on- Returns:
- an instance of
WCCrepresenting the next stage of the where condition clause
-
where
- Specified by:
wherein interfaceJoinClauseTerminal<DTO,DtoJoinClause<DTO>, DtoJoinConditionClause<DTO>, DtoJoinConditionClauseTerminal<DTO>, DtoWhereConditionClause<DTO>, DtoWhereConditionClauseTerminal<DTO>, DtoGroupByClauseTerminal<DTO>, DtoHavingConditionClause<DTO>, DtoHavingConditionClauseTerminal<DTO>, DtoOrderByClause<DTO>, DtoOrderByClauseChain<DTO>>
-
withId
Convenience method to select a DTO by its primary key.- Parameters:
id- the primary key value- Returns:
- the selected DTO, if found
-
withIdOrNull
Convenience method to select a DTO by its primary key.- Parameters:
id- the primary key value- Returns:
- the selected DTO, or
nullif not found
-
withIdOrThrow
Retrieves a DTO by its primary key and throws an exception if no matching entry is found.- Parameters:
id- the primary key value used to identify the DTO- Returns:
- the DTO associated with the given primary key
- Throws:
NoSuchElementException- if no DTO is found with the specified primary key
-
withIdOrThrow
public <X extends Throwable> DTO withIdOrThrow(Object id, Supplier<? extends X> exceptionSupplier) throws X Retrieves a DTO by its primary key and throws the specified exception if no matching entry is found.- Type Parameters:
X- the type of exception to be thrown- Parameters:
id- the primary key value used to identify the DTOexceptionSupplier- a supplier that provides the exception to be thrown if the DTO is not found- Returns:
- the DTO associated with the given primary key
- Throws:
X- the exception provided by the supplier if no DTO is found with the specified primary key
-
join
- Specified by:
joinin interfaceDtoJoinClassTerminal<DTO>
-
groupBy
Description copied from interface:WhereClauseTerminalAdds a GROUP BY clause to the query, specifying the column(s) to group the results by.- Specified by:
groupByin interfaceWhereClauseTerminal<DTO,DtoGroupByClauseTerminal<DTO>, DtoHavingConditionClause<DTO>, DtoHavingConditionClauseTerminal<DTO>, DtoOrderByClause<DTO>, DtoOrderByClauseChain<DTO>> - Parameters:
fields- the column(s) to group the results by. Each column must be valid for the associated table or view in the query.- Returns:
- an instance of the type representing the GROUP BY clause, allowing further specification of ordering or transitioning to the next query stage.
-
groupBy
Description copied from interface:WhereClauseTerminalAdds a GROUP BY clause to the query, specifying the expressions to group the results by.- Specified by:
groupByin interfaceWhereClauseTerminal<DTO,DtoGroupByClauseTerminal<DTO>, DtoHavingConditionClause<DTO>, DtoHavingConditionClauseTerminal<DTO>, DtoOrderByClause<DTO>, DtoOrderByClauseChain<DTO>> - Parameters:
fields- the expressions to group the results by.- Returns:
- an instance of the type representing the GROUP BY clause, allowing further specification of ordering or transitioning to the next query stage.
-
orderBy
Description copied from interface:WhereClauseTerminalAdds an ORDER BY clause to the query, specifying the expressions to sort the results by.- Specified by:
orderByin interfaceWhereClauseTerminal<DTO,DtoGroupByClauseTerminal<DTO>, DtoHavingConditionClause<DTO>, DtoHavingConditionClauseTerminal<DTO>, DtoOrderByClause<DTO>, DtoOrderByClauseChain<DTO>> - 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:WhereClauseTerminalAdds an ORDER BY clause to the query, specifying the fields and expressions to sort the results by.- Specified by:
orderByin interfaceWhereClauseTerminal<DTO,DtoGroupByClauseTerminal<DTO>, DtoHavingConditionClause<DTO>, DtoHavingConditionClauseTerminal<DTO>, DtoOrderByClause<DTO>, DtoOrderByClauseChain<DTO>> - Parameters:
fields- the field and column specifications that determine the order of the results. Each specification includes a mapping of a field to a column. The order in which the specifications are provided defines 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.
-