Module litebridge.orm
Package org.litebridge.orm.api.condition
Class AbstractCbConditionClauseTerminal<DTO,CC extends AbstractCbConditionClause<DTO,CC,SELF,QCB>,SELF extends AbstractCbConditionClauseTerminal<DTO,CC,SELF,QCB>,QCB extends QueryConditionBuilder<DTO,?,CC,SELF,QCB>>
java.lang.Object
org.litebridge.orm.api.condition.AbstractCbConditionClauseTerminal<DTO,CC,SELF,QCB>
- Type Parameters:
DTO- The type of the DTO being queried.
- All Implemented Interfaces:
ConditionClauseTerminal<DTO,CC, SELF, QCB>
- Direct Known Subclasses:
CbDtoConditionClauseTerminal,CbSqlConditionClauseTerminal
public abstract sealed class AbstractCbConditionClauseTerminal<DTO,CC extends AbstractCbConditionClause<DTO,CC,SELF,QCB>,SELF extends AbstractCbConditionClauseTerminal<DTO,CC,SELF,QCB>,QCB extends QueryConditionBuilder<DTO,?,CC,SELF,QCB>>
extends Object
implements ConditionClauseTerminal<DTO,CC,SELF,QCB>
permits CbDtoConditionClauseTerminal<DTO>, CbSqlConditionClauseTerminal<ReturnType>
Abstract base class for terminal condition clauses in the fluent select API.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final LitebridgeContextThe Litebridge context.protected final QueryNodeThe current query node in the AST. -
Constructor Summary
ConstructorsConstructorDescriptionAbstractCbConditionClauseTerminal(QueryNode node, LitebridgeContext litebridgeContext) Constructs a newAbstractCbConditionClauseTerminal. -
Method Summary
Modifier and TypeMethodDescriptionfinal CCAdds an "AND" condition to the current condition clause using the specified column.final CCand(ExpressionSpec expression) Adds an "AND" condition to the current condition clause using the specified expression.final SELFAdds an "AND" condition with a nested condition clause.final CCAdds an "OR" condition to the current condition clause using the specified column.final CCor(ExpressionSpec expression) Adds an "OR" condition to the current condition clause using the specified expression.final SELFAdds an "OR" condition with specified nested condition clause.protected abstract CCwhereImpl(LogicOperator logicOperator, String column) Internal implementation of the WHERE clause for column names.protected abstract CCwhereImpl(LogicOperator logicOperator, ExpressionSpec expression) Internal implementation of the WHERE clause for expressions.protected abstract SELFwhereImpl(LogicOperator logicOperator, QCB query) Internal implementation of the WHERE clause for sub-conditions in queries.
-
Field Details
-
litebridgeContext
The Litebridge context. -
node
The current query node in the AST.
-
-
Constructor Details
-
AbstractCbConditionClauseTerminal
Constructs a newAbstractCbConditionClauseTerminal.- Parameters:
node- The current query node.litebridgeContext- The Litebridge context.
-
-
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,CC extends AbstractCbConditionClause<DTO, CC, SELF, QCB>, SELF extends AbstractCbConditionClauseTerminal<DTO, CC, SELF, QCB>, QCB extends QueryConditionBuilder<DTO, ?, CC, SELF, QCB>> - 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,CC extends AbstractCbConditionClause<DTO, CC, SELF, QCB>, SELF extends AbstractCbConditionClauseTerminal<DTO, CC, SELF, QCB>, QCB extends QueryConditionBuilder<DTO, ?, CC, SELF, QCB>> - 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,CC extends AbstractCbConditionClause<DTO, CC, SELF, QCB>, SELF extends AbstractCbConditionClauseTerminal<DTO, CC, SELF, QCB>, QCB extends QueryConditionBuilder<DTO, ?, CC, SELF, QCB>> - 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,CC extends AbstractCbConditionClause<DTO, CC, SELF, QCB>, SELF extends AbstractCbConditionClauseTerminal<DTO, CC, SELF, QCB>, QCB extends QueryConditionBuilder<DTO, ?, CC, SELF, QCB>> - 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,CC extends AbstractCbConditionClause<DTO, CC, SELF, QCB>, SELF extends AbstractCbConditionClauseTerminal<DTO, CC, SELF, QCB>, QCB extends QueryConditionBuilder<DTO, ?, CC, SELF, QCB>> - 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,CC extends AbstractCbConditionClause<DTO, CC, SELF, QCB>, SELF extends AbstractCbConditionClauseTerminal<DTO, CC, SELF, QCB>, QCB extends QueryConditionBuilder<DTO, ?, CC, SELF, QCB>> - Parameters:
expression- the expression to be used in the "AND" condition- Returns:
- the parent condition clause interface, allowing further chaining of conditions
-
whereImpl
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
Internal implementation of the WHERE clause for expressions.- Parameters:
logicOperator- The logical operator (AND/OR).expression- The expression specification.- Returns:
- A new
AbstractCbConditionClauseinstance.
-
whereImpl
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.
-