Package org.hibernate.sql.model.ast
Class AbstractTableUpdate<O extends MutationOperation>
- java.lang.Object
-
- org.hibernate.sql.model.ast.AbstractTableMutation<O>
-
- org.hibernate.sql.model.ast.AbstractRestrictedTableMutation<O>
-
- org.hibernate.sql.model.ast.AbstractTableUpdate<O>
-
- All Implemented Interfaces:
Statement
,RestrictedTableMutation<O>
,TableMutation<O>
,TableUpdate<O>
- Direct Known Subclasses:
TableUpdateCustomSql
,TableUpdateStandard
public abstract class AbstractTableUpdate<O extends MutationOperation> extends AbstractRestrictedTableMutation<O> implements TableUpdate<O>
Base support for TableUpdate implementations
-
-
Constructor Summary
Constructors Constructor Description AbstractTableUpdate(MutatingTableReference mutatingTable, MutationTarget<?> mutationTarget, String sqlComment, List<ColumnValueBinding> valueBindings, List<ColumnValueBinding> keyRestrictionBindings, List<ColumnValueBinding> optLockRestrictionBindings)
AbstractTableUpdate(MutatingTableReference tableReference, MutationTarget<?> mutationTarget, String sqlComment, List<ColumnValueBinding> valueBindings, List<ColumnValueBinding> keyRestrictionBindings, List<ColumnValueBinding> optLockRestrictionBindings, List<ColumnValueParameter> parameters)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static List<ColumnValueParameter>
collectParameters(List<ColumnValueBinding> valueBindings, List<ColumnValueBinding> keyRestrictionBindings, List<ColumnValueBinding> optLockRestrictionBindings)
protected O
createMutationOperation(TableMapping tableDetails, String sql, List<JdbcParameterBinder> effectiveBinders)
Intended for use fromSqlAstTranslator
void
forEachParameter(Consumer<ColumnValueParameter> consumer)
Visit the JDBC parameters associated with this mutation.void
forEachValueBinding(BiConsumer<Integer,ColumnValueBinding> consumer)
Visit each value bindingExpectation
getExpectation()
The validation expectation for the mutationprotected String
getLoggableName()
List<ColumnValueBinding>
getValueBindings()
The value bindings for each column.-
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, createMutationOperation, forEachThing, getMutatingTable, getMutationComment, getMutationTarget, getParameters, isCustomSql, 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, createMutationOperation, getMutatingTable, getMutationComment, getParameters, getTableName, isCallable
-
Methods inherited from interface org.hibernate.sql.model.ast.TableUpdate
getNumberOfValueBindings
-
-
-
-
Constructor Detail
-
AbstractTableUpdate
public AbstractTableUpdate(MutatingTableReference mutatingTable, MutationTarget<?> mutationTarget, String sqlComment, List<ColumnValueBinding> valueBindings, List<ColumnValueBinding> keyRestrictionBindings, List<ColumnValueBinding> optLockRestrictionBindings)
-
AbstractTableUpdate
public AbstractTableUpdate(MutatingTableReference tableReference, MutationTarget<?> mutationTarget, String sqlComment, List<ColumnValueBinding> valueBindings, List<ColumnValueBinding> keyRestrictionBindings, List<ColumnValueBinding> optLockRestrictionBindings, List<ColumnValueParameter> parameters)
-
-
Method Detail
-
collectParameters
public static List<ColumnValueParameter> collectParameters(List<ColumnValueBinding> valueBindings, List<ColumnValueBinding> keyRestrictionBindings, List<ColumnValueBinding> optLockRestrictionBindings)
-
getLoggableName
protected String getLoggableName()
- Specified by:
getLoggableName
in classAbstractTableMutation<O extends MutationOperation>
-
getExpectation
public Expectation getExpectation()
Description copied from interface:TableMutation
The validation expectation for the mutation- Specified by:
getExpectation
in interfaceTableMutation<O extends MutationOperation>
-
getValueBindings
public List<ColumnValueBinding> getValueBindings()
Description copied from interface:TableUpdate
The value bindings for each column.- Specified by:
getValueBindings
in interfaceTableUpdate<O extends MutationOperation>
-
forEachValueBinding
public void forEachValueBinding(BiConsumer<Integer,ColumnValueBinding> consumer)
Description copied from interface:TableUpdate
Visit each value binding- Specified by:
forEachValueBinding
in interfaceTableUpdate<O extends MutationOperation>
- See Also:
TableUpdate.getValueBindings()
-
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<O extends MutationOperation>
- Overrides:
forEachParameter
in classAbstractTableMutation<O extends MutationOperation>
- See Also:
TableMutation.getParameters()
-
createMutationOperation
protected O createMutationOperation(TableMapping tableDetails, String sql, List<JdbcParameterBinder> effectiveBinders)
Description copied from class:AbstractTableMutation
Intended for use fromSqlAstTranslator
- Specified by:
createMutationOperation
in classAbstractTableMutation<O extends MutationOperation>
effectiveBinders
- The parameter binders effective for this table mutation
-
-