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 OcreateMutationOperation(TableMapping tableDetails, String sql, List<JdbcParameterBinder> effectiveBinders)Intended for use fromSqlAstTranslatorvoidforEachParameter(Consumer<ColumnValueParameter> consumer)Visit the JDBC parameters associated with this mutation.voidforEachValueBinding(BiConsumer<Integer,ColumnValueBinding> consumer)Visit each value bindingExpectationgetExpectation()The validation expectation for the mutationprotected StringgetLoggableName()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:
getLoggableNamein classAbstractTableMutation<O extends MutationOperation>
-
getExpectation
public Expectation getExpectation()
Description copied from interface:TableMutationThe validation expectation for the mutation- Specified by:
getExpectationin interfaceTableMutation<O extends MutationOperation>
-
getValueBindings
public List<ColumnValueBinding> getValueBindings()
Description copied from interface:TableUpdateThe value bindings for each column.- Specified by:
getValueBindingsin interfaceTableUpdate<O extends MutationOperation>
-
forEachValueBinding
public void forEachValueBinding(BiConsumer<Integer,ColumnValueBinding> consumer)
Description copied from interface:TableUpdateVisit each value binding- Specified by:
forEachValueBindingin interfaceTableUpdate<O extends MutationOperation>- See Also:
TableUpdate.getValueBindings()
-
forEachParameter
public void forEachParameter(Consumer<ColumnValueParameter> consumer)
Description copied from interface:TableMutationVisit the JDBC parameters associated with this mutation. The order here is the expected binding order for thePreparedStatement.- Specified by:
forEachParameterin interfaceTableMutation<O extends MutationOperation>- Overrides:
forEachParameterin classAbstractTableMutation<O extends MutationOperation>- See Also:
TableMutation.getParameters()
-
createMutationOperation
protected O createMutationOperation(TableMapping tableDetails, String sql, List<JdbcParameterBinder> effectiveBinders)
Description copied from class:AbstractTableMutationIntended for use fromSqlAstTranslator- Specified by:
createMutationOperationin classAbstractTableMutation<O extends MutationOperation>effectiveBinders- The parameter binders effective for this table mutation
-
-