Package org.hibernate.sql.model.ast
Class AbstractTableMutation<O extends MutationOperation>
- java.lang.Object
-
- org.hibernate.sql.model.ast.AbstractTableMutation<O>
-
- All Implemented Interfaces:
Statement,TableMutation<O>
- Direct Known Subclasses:
AbstractRestrictedTableMutation,AbstractTableInsert
public abstract class AbstractTableMutation<O extends MutationOperation> extends Object implements TableMutation<O>
BaseTableMutationsupport
-
-
Constructor Summary
Constructors Constructor Description AbstractTableMutation(MutatingTableReference mutatingTable, MutationTarget<?> mutationTarget, String sqlComment, List<ColumnValueParameter> parameters)
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description OcreateMutationOperation(String sql, List<JdbcParameterBinder> parameterBinders)Intended for use fromSqlAstTranslatorprotected abstract OcreateMutationOperation(TableMapping tableDetails, String sql, List<JdbcParameterBinder> effectiveBinders)Intended for use fromSqlAstTranslatorOcreateMutationOperation(ValuesAnalysis valuesAnalysis, SessionFactoryImplementor factory)voidforEachParameter(Consumer<ColumnValueParameter> consumer)Visit the JDBC parameters associated with this mutation.protected static <T> voidforEachThing(List<T> list, BiConsumer<Integer,T> action)protected abstract StringgetLoggableName()MutatingTableReferencegetMutatingTable()The table being mutatedStringgetMutationComment()The comment to be used in the SQL if enabled and supportedMutationTarget<?>getMutationTarget()List<ColumnValueParameter>getParameters()The JDBC parameters associated with this mutation.booleanisCustomSql()StringtoString()-
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.TableMutation
getExpectation, getTableName, isCallable
-
-
-
-
Constructor Detail
-
AbstractTableMutation
public AbstractTableMutation(MutatingTableReference mutatingTable, MutationTarget<?> mutationTarget, String sqlComment, List<ColumnValueParameter> parameters)
-
-
Method Detail
-
isCustomSql
public boolean isCustomSql()
-
getLoggableName
protected abstract String getLoggableName()
-
getMutatingTable
public MutatingTableReference getMutatingTable()
Description copied from interface:TableMutationThe table being mutated- Specified by:
getMutatingTablein interfaceTableMutation<O extends MutationOperation>
-
getMutationTarget
public MutationTarget<?> getMutationTarget()
-
getMutationComment
public String getMutationComment()
Description copied from interface:TableMutationThe comment to be used in the SQL if enabled and supported- Specified by:
getMutationCommentin interfaceTableMutation<O extends MutationOperation>
-
getParameters
public List<ColumnValueParameter> getParameters()
Description copied from interface:TableMutationThe JDBC parameters associated with this mutation. The order here is the expected binding order for thePreparedStatement.- Specified by:
getParametersin interfaceTableMutation<O extends MutationOperation>- See Also:
TableMutation.forEachParameter(java.util.function.Consumer<org.hibernate.sql.model.ast.ColumnValueParameter>)
-
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>- See Also:
TableMutation.getParameters()
-
forEachThing
protected static <T> void forEachThing(List<T> list, BiConsumer<Integer,T> action)
-
createMutationOperation
public O createMutationOperation(ValuesAnalysis valuesAnalysis, SessionFactoryImplementor factory)
- Specified by:
createMutationOperationin interfaceTableMutation<O extends MutationOperation>
-
createMutationOperation
public final O createMutationOperation(String sql, List<JdbcParameterBinder> parameterBinders)
Intended for use fromSqlAstTranslator- Specified by:
createMutationOperationin interfaceTableMutation<O extends MutationOperation>
-
createMutationOperation
protected abstract O createMutationOperation(TableMapping tableDetails, String sql, List<JdbcParameterBinder> effectiveBinders)
Intended for use fromSqlAstTranslator- Parameters:
effectiveBinders- The parameter binders effective for this table mutation
-
-