Package org.hibernate.sql.model.internal
Class TableUpsert
- java.lang.Object
-
- org.hibernate.sql.model.ast.AbstractTableMutation<O>
-
- org.hibernate.sql.model.ast.AbstractRestrictedTableMutation<MutationOperation>
-
- org.hibernate.sql.model.internal.TableUpsert
-
- All Implemented Interfaces:
Statement
,RestrictedTableMutation<MutationOperation>
,TableMutation<MutationOperation>
public class TableUpsert extends AbstractRestrictedTableMutation<MutationOperation> implements RestrictedTableMutation<MutationOperation>
-
-
Constructor Summary
Constructors Constructor Description TableUpsert(MutatingTableReference mutatingTable, MutationTarget<?> mutationTarget, String comment, List<ColumnValueBinding> valueBindings, List<ColumnValueBinding> keyRestrictionBindings, List<ColumnValueBinding> optLockRestrictionBindings)
TableUpsert(MutatingTableReference mutatingTable, MutationTarget<?> mutationTarget, List<ColumnValueBinding> valueBindings, List<ColumnValueBinding> keyRestrictionBindings, List<ColumnValueBinding> optLockRestrictionBindings)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
accept(SqlAstWalker walker)
Visitationprotected MutationOperation
createMutationOperation(TableMapping tableDetails, String updateSql, List<JdbcParameterBinder> effectiveBinders)
Intended for use fromSqlAstTranslator
MutationOperation
createMutationOperation(ValuesAnalysis valuesAnalysis, SessionFactoryImplementor factory)
void
forEachParameter(Consumer<ColumnValueParameter> consumer)
Visit the JDBC parameters associated with this mutation.void
forEachValueBinding(BiConsumer<Integer,ColumnValueBinding> consumer)
Expectation
getExpectation()
The validation expectation for the mutationprotected String
getLoggableName()
EntityMutationTarget
getMutationTarget()
List<ColumnValueBinding>
getValueBindings()
boolean
isCallable()
Is the mutation a procedure/function?boolean
isCustomSql()
-
Methods inherited from class org.hibernate.sql.model.ast.AbstractRestrictedTableMutation
forEachKeyBinding, forEachOptimisticLockBinding, getKeyBindings, getOptimisticLockBindings
-
Methods inherited from class org.hibernate.sql.model.ast.AbstractTableMutation
createMutationOperation, forEachThing, getMutatingTable, getMutationComment, getParameters, toString
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.hibernate.sql.model.ast.RestrictedTableMutation
forEachKeyBinding, forEachOptimisticLockBinding, getKeyBindings, getNumberOfKeyBindings, getNumberOfOptimisticLockBindings, getOptimisticLockBindings
-
Methods inherited from interface org.hibernate.sql.model.ast.TableMutation
createMutationOperation, getMutatingTable, getMutationComment, getParameters, getTableName
-
-
-
-
Constructor Detail
-
TableUpsert
public TableUpsert(MutatingTableReference mutatingTable, MutationTarget<?> mutationTarget, List<ColumnValueBinding> valueBindings, List<ColumnValueBinding> keyRestrictionBindings, List<ColumnValueBinding> optLockRestrictionBindings)
-
TableUpsert
public TableUpsert(MutatingTableReference mutatingTable, MutationTarget<?> mutationTarget, String comment, List<ColumnValueBinding> valueBindings, List<ColumnValueBinding> keyRestrictionBindings, List<ColumnValueBinding> optLockRestrictionBindings)
-
-
Method Detail
-
getLoggableName
protected String getLoggableName()
- Specified by:
getLoggableName
in classAbstractTableMutation<MutationOperation>
-
isCustomSql
public boolean isCustomSql()
- Overrides:
isCustomSql
in classAbstractTableMutation<MutationOperation>
-
getMutationTarget
public EntityMutationTarget getMutationTarget()
- Overrides:
getMutationTarget
in classAbstractTableMutation<MutationOperation>
-
isCallable
public boolean isCallable()
Description copied from interface:TableMutation
Is the mutation a procedure/function?- Specified by:
isCallable
in interfaceTableMutation<MutationOperation>
-
getExpectation
public Expectation getExpectation()
Description copied from interface:TableMutation
The validation expectation for the mutation- Specified by:
getExpectation
in interfaceTableMutation<MutationOperation>
-
forEachParameter
public void forEachParameter(Consumer<ColumnValueParameter> consumer)
Description copied from interface:TableMutation
Visit the JDBC parameters associated with this mutation. The order here is the expected binding order for thePreparedStatement
.- Specified by:
forEachParameter
in interfaceTableMutation<MutationOperation>
- Overrides:
forEachParameter
in classAbstractTableMutation<MutationOperation>
- See Also:
TableMutation.getParameters()
-
getValueBindings
public List<ColumnValueBinding> getValueBindings()
-
forEachValueBinding
public void forEachValueBinding(BiConsumer<Integer,ColumnValueBinding> consumer)
-
accept
public void accept(SqlAstWalker walker)
Description copied from interface:Statement
Visitation
-
createMutationOperation
public MutationOperation createMutationOperation(ValuesAnalysis valuesAnalysis, SessionFactoryImplementor factory)
- Specified by:
createMutationOperation
in interfaceTableMutation<MutationOperation>
- Overrides:
createMutationOperation
in classAbstractTableMutation<MutationOperation>
-
createMutationOperation
protected MutationOperation createMutationOperation(TableMapping tableDetails, String updateSql, List<JdbcParameterBinder> effectiveBinders)
Description copied from class:AbstractTableMutation
Intended for use fromSqlAstTranslator
- Specified by:
createMutationOperation
in classAbstractTableMutation<MutationOperation>
effectiveBinders
- The parameter binders effective for this table mutation
-
-