Module litebridge.orm
Package org.litebridge.orm.api.merge
Class MergeOnConditionClauseTerminal<DTO,SELF extends MergeOnConditionClauseTerminal<DTO,SELF,MUS,MIS,QCB>,MUS extends MergeUpdateStep,MIS extends MergeInsertStep,QCB extends QueryConditionBuilder<DTO,?,?,?,QCB>>
java.lang.Object
org.litebridge.orm.api.merge.MergeTerminal
org.litebridge.orm.api.merge.MergeWhenNotMatchedStep<MIS>
org.litebridge.orm.api.merge.MergeWhenMatchedStep<DTO,MUS,MIS>
org.litebridge.orm.api.merge.MergeOnConditionClauseTerminal<DTO,SELF,MUS,MIS,QCB>
- Type Parameters:
DTO- the mapped DTO/entity type orRowMUS- the merge update step typeMIS- the merge insert step type
- All Implemented Interfaces:
ConditionClauseTerminal<DTO,MergeConditionClause<DTO, MUS, SELF, QCB>, SELF, QCB>
- Direct Known Subclasses:
DtoMergeOnConditionClauseTerminal,SqlMergeOnConditionClauseTerminal
public abstract sealed class MergeOnConditionClauseTerminal<DTO,SELF extends MergeOnConditionClauseTerminal<DTO,SELF,MUS,MIS,QCB>,MUS extends MergeUpdateStep,MIS extends MergeInsertStep,QCB extends QueryConditionBuilder<DTO,?,?,?,QCB>>
extends MergeWhenMatchedStep<DTO,MUS,MIS>
implements ConditionClauseTerminal<DTO,MergeConditionClause<DTO,MUS,SELF,QCB>,SELF,QCB>
permits DtoMergeOnConditionClauseTerminal<DTO>, SqlMergeOnConditionClauseTerminal
Terminal step for a MERGE ON condition clause.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final @Nullable Class<?> protected final @Nullable QueryNodeprotected final @Nullable Stringprotected final @Nullable ValuesSpecFields inherited from class org.litebridge.orm.api.merge.MergeWhenNotMatchedStep
litebridgeContext, mergeNodeFields inherited from class org.litebridge.orm.api.merge.MergeTerminal
node -
Constructor Summary
ConstructorsConstructorDescriptionMergeOnConditionClauseTerminal(@Nullable String usingTable, @Nullable Class<?> usingDtoClass, @Nullable QueryNode usingQueryNode, @Nullable ValuesSpec usingValues, @Nullable String usingAlias, QueryNode on, MergeNode mergeNode, LitebridgeContext litebridgeContext) Creates a newMergeOnConditionClauseTerminalinstance. -
Method Summary
Modifier and TypeMethodDescriptionAdds an AND condition with the specified column.and(ExpressionSpec expression) Adds an AND condition with the specified expression.Adds an AND nested condition block.protected MergeConditionClause<DTO, MUS, SELF, QCB> onImpl(LogicOperator logicOperator, @Nullable String column, @Nullable ExpressionSpec expression) protected abstract SELFonImpl(LogicOperator logicOperator, QCB query) Adds an OR condition with the specified column.or(ExpressionSpec expression) Adds an OR condition with the specified expression.Adds an OR nested condition block.Methods inherited from class org.litebridge.orm.api.merge.MergeWhenMatchedStep
whenMatchedMethods inherited from class org.litebridge.orm.api.merge.MergeWhenNotMatchedStep
whenNotMatched
-
Field Details
-
usingTable
-
usingDtoClass
-
usingQueryNode
-
usingValues
-
-
Constructor Details
-
MergeOnConditionClauseTerminal
public MergeOnConditionClauseTerminal(@Nullable String usingTable, @Nullable Class<?> usingDtoClass, @Nullable QueryNode usingQueryNode, @Nullable ValuesSpec usingValues, @Nullable String usingAlias, QueryNode on, MergeNode mergeNode, LitebridgeContext litebridgeContext) Creates a newMergeOnConditionClauseTerminalinstance.- Parameters:
usingTable- Table to use as the merge source.usingDtoClass- DTO class to use as the merge source.usingQueryNode- Subquery to merge on.usingValues- Values to merge on.usingAlias- Alias to use for the merge source.on- The using on condition clause query node.mergeNode- The root merge query node.litebridgeContext- Current Litebridge context.
-
-
Method Details
-
and
Adds an AND condition with the specified column.- Specified by:
andin interfaceConditionClauseTerminal<DTO,SELF extends MergeOnConditionClauseTerminal<DTO, SELF, MUS, MIS, QCB>, MUS extends MergeUpdateStep, MIS extends MergeInsertStep> - Parameters:
column- the column name- Returns:
- the condition clause
-
and
Adds an AND condition with the specified expression.- Specified by:
andin interfaceConditionClauseTerminal<DTO,SELF extends MergeOnConditionClauseTerminal<DTO, SELF, MUS, MIS, QCB>, MUS extends MergeUpdateStep, MIS extends MergeInsertStep> - Parameters:
expression- the expression specification- Returns:
- the condition clause
-
and
Adds an AND nested condition block.- Specified by:
andin interfaceConditionClauseTerminal<DTO,SELF extends MergeOnConditionClauseTerminal<DTO, SELF, MUS, MIS, QCB>, MUS extends MergeUpdateStep, MIS extends MergeInsertStep> - Parameters:
query- the query condition builder- Returns:
- the condition clause terminal
-
or
Adds an OR condition with the specified column.- Specified by:
orin interfaceConditionClauseTerminal<DTO,SELF extends MergeOnConditionClauseTerminal<DTO, SELF, MUS, MIS, QCB>, MUS extends MergeUpdateStep, MIS extends MergeInsertStep> - Parameters:
column- the column name- Returns:
- the condition clause
-
or
Adds an OR condition with the specified expression.- Specified by:
orin interfaceConditionClauseTerminal<DTO,SELF extends MergeOnConditionClauseTerminal<DTO, SELF, MUS, MIS, QCB>, MUS extends MergeUpdateStep, MIS extends MergeInsertStep> - Parameters:
expression- the expression specification- Returns:
- the condition clause
-
or
Adds an OR nested condition block.- Specified by:
orin interfaceConditionClauseTerminal<DTO,SELF extends MergeOnConditionClauseTerminal<DTO, SELF, MUS, MIS, QCB>, MUS extends MergeUpdateStep, MIS extends MergeInsertStep> - Parameters:
query- the query condition builder- Returns:
- the condition clause terminal
-
onImpl
protected MergeConditionClause<DTO,MUS, onImplSELF, QCB> (LogicOperator logicOperator, @Nullable String column, @Nullable ExpressionSpec expression) -
onImpl
-