Module litebridge.orm
Package org.litebridge.orm.api.condition
Class AbstractCbConditionClauseTerminal<DTO>
java.lang.Object
org.litebridge.orm.api.condition.AbstractCbConditionClauseTerminal<DTO>
- Type Parameters:
DTO- The type of the DTO being queried.
- All Implemented Interfaces:
ConditionClauseTerminal<DTO,AbstractCbConditionClause<DTO>, AbstractCbConditionClauseTerminal<DTO>>
- Direct Known Subclasses:
CbDtoConditionClauseTerminal
public abstract sealed class AbstractCbConditionClauseTerminal<DTO>
extends Object
implements ConditionClauseTerminal<DTO,AbstractCbConditionClause<DTO>,AbstractCbConditionClauseTerminal<DTO>>
permits CbDtoConditionClauseTerminal<DTO> (not exhaustive)
Abstract base class for terminal condition clauses in the fluent select API.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final FromClauseEngineThe engine used to process the FROM clause.protected QueryNodeThe current query node in the AST. -
Constructor Summary
ConstructorsConstructorDescriptionAbstractCbConditionClauseTerminal(FromClauseEngine fromClauseEngine, QueryNode node) Constructs a newAbstractCbConditionClauseTerminal. -
Method Summary
Modifier and TypeMethodDescriptionfinal AbstractCbConditionClause<DTO> Adds an "AND" condition to the current condition clause using the specified column.and(QueryConditionBuilder<DTO> query) Adds an "AND" condition with a nested condition clause.final AbstractCbConditionClause<DTO> and(ExpressionSpec expression) Adds an "AND" condition to the current condition clause using the specified expression.node()Returns the current query node.final AbstractCbConditionClause<DTO> Adds an "OR" condition to the current condition clause using the specified column.or(QueryConditionBuilder<DTO> query) Adds an "OR" condition with specified nested condition clause.final AbstractCbConditionClause<DTO> or(ExpressionSpec expression) Adds an "OR" condition to the current condition clause using the specified expression.protected abstract AbstractCbConditionClause<DTO> whereImpl(LogicOperator logicOperator, String column) Internal implementation of the WHERE clause for column names.protected abstract AbstractCbConditionClauseTerminal<DTO> whereImpl(LogicOperator logicOperator, QueryConditionBuilder<DTO> query) Internal implementation of the WHERE clause for sub-conditions in queries.protected abstract AbstractCbConditionClause<DTO> whereImpl(LogicOperator logicOperator, ExpressionSpec expression) Internal implementation of the WHERE clause for expressions.
-
Field Details
-
fromClauseEngine
The engine used to process the FROM clause. -
node
The current query node in the AST.
-
-
Constructor Details
-
AbstractCbConditionClauseTerminal
Constructs a newAbstractCbConditionClauseTerminal.- Parameters:
fromClauseEngine- The FROM clause engine.node- The current query node.
-
-
Method Details
-
and
Description copied from interface:ConditionClauseTerminalAdds an "AND" condition to the current condition clause using the specified column.This method is used to chain additional conditions in a SQL query in a fluent manner.
- Specified by:
andin interfaceConditionClauseTerminal<DTO,AbstractCbConditionClause<DTO>, AbstractCbConditionClauseTerminal<DTO>> - Parameters:
field- the name of the column to be used in the "AND" condition- Returns:
- the parent condition clause interface, allowing further chaining of conditions
-
and
Description copied from interface:ConditionClauseTerminalAdds an "AND" condition to the current condition clause using the specified expression.This method is used to chain additional conditions in a SQL query in a type-safe and fluent manner.
- Specified by:
andin interfaceConditionClauseTerminal<DTO,AbstractCbConditionClause<DTO>, AbstractCbConditionClauseTerminal<DTO>> - Parameters:
expression- the expression to be used in the "AND" condition- Returns:
- the parent condition clause interface, allowing further chaining of conditions
-
and
Description copied from interface:ConditionClauseTerminalAdds an "AND" condition with a nested condition clause.The nested condition clause is grouped with parentheses to ensure proper SQL syntax.
- Specified by:
andin interfaceConditionClauseTerminal<DTO,AbstractCbConditionClause<DTO>, AbstractCbConditionClauseTerminal<DTO>> - Parameters:
query- Function that builds the nested condition clause- Returns:
- the parent condition clause interface, allowing further chaining of conditions
-
or
Description copied from interface:ConditionClauseTerminalAdds an "OR" condition with specified nested condition clause.The nested condition clause is grouped with parentheses to ensure proper SQL syntax.
- Specified by:
orin interfaceConditionClauseTerminal<DTO,AbstractCbConditionClause<DTO>, AbstractCbConditionClauseTerminal<DTO>> - Parameters:
query- Function that builds the nested condition clause- Returns:
- the parent condition clause interface, allowing further chaining of conditions
-
or
Description copied from interface:ConditionClauseTerminalAdds an "OR" condition to the current condition clause using the specified column.This method is used to chain additional conditions in a SQL query in a fluent manner.
- Specified by:
orin interfaceConditionClauseTerminal<DTO,AbstractCbConditionClause<DTO>, AbstractCbConditionClauseTerminal<DTO>> - Parameters:
field- the name of the column to be used in the "AND" condition- Returns:
- the parent condition clause interface, allowing further chaining of conditions
-
or
Description copied from interface:ConditionClauseTerminalAdds an "OR" condition to the current condition clause using the specified expression.This method is used to chain additional conditions in a SQL query in a type-safe and fluent manner.
- Specified by:
orin interfaceConditionClauseTerminal<DTO,AbstractCbConditionClause<DTO>, AbstractCbConditionClauseTerminal<DTO>> - Parameters:
expression- the expression to be used in the "AND" condition- Returns:
- the parent condition clause interface, allowing further chaining of conditions
-
whereImpl
protected abstract AbstractCbConditionClause<DTO> whereImpl(LogicOperator logicOperator, String column) Internal implementation of the WHERE clause for column names.- Parameters:
logicOperator- The logical operator (AND/OR).column- The column name.- Returns:
- A new
AbstractCbConditionClauseinstance.
-
whereImpl
protected abstract AbstractCbConditionClause<DTO> whereImpl(LogicOperator logicOperator, ExpressionSpec expression) Internal implementation of the WHERE clause for expressions.- Parameters:
logicOperator- The logical operator (AND/OR).expression- The expression specification.- Returns:
- A new
AbstractCbConditionClauseinstance.
-
whereImpl
protected abstract AbstractCbConditionClauseTerminal<DTO> whereImpl(LogicOperator logicOperator, QueryConditionBuilder<DTO> query) Internal implementation of the WHERE clause for sub-conditions in queries.- Parameters:
logicOperator- The logical operator (AND/OR).query- The sub-condition builder- Returns:
- A new
AbstractCbConditionClauseinstance.
-
node
Returns the current query node.- Returns:
- the query node
-