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>
BaseTableMutation
support
-
-
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 O
createMutationOperation(String sql, List<JdbcParameterBinder> parameterBinders)
Intended for use fromSqlAstTranslator
protected abstract O
createMutationOperation(TableMapping tableDetails, String sql, List<JdbcParameterBinder> effectiveBinders)
Intended for use fromSqlAstTranslator
O
createMutationOperation(ValuesAnalysis valuesAnalysis, SessionFactoryImplementor factory)
void
forEachParameter(Consumer<ColumnValueParameter> consumer)
Visit the JDBC parameters associated with this mutation.protected static <T> void
forEachThing(List<T> list, BiConsumer<Integer,T> action)
protected abstract String
getLoggableName()
MutatingTableReference
getMutatingTable()
The table being mutatedString
getMutationComment()
The comment to be used in the SQL if enabled and supportedMutationTarget<?>
getMutationTarget()
List<ColumnValueParameter>
getParameters()
The JDBC parameters associated with this mutation.boolean
isCustomSql()
String
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.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:TableMutation
The table being mutated- Specified by:
getMutatingTable
in interfaceTableMutation<O extends MutationOperation>
-
getMutationTarget
public MutationTarget<?> getMutationTarget()
-
getMutationComment
public String getMutationComment()
Description copied from interface:TableMutation
The comment to be used in the SQL if enabled and supported- Specified by:
getMutationComment
in interfaceTableMutation<O extends MutationOperation>
-
getParameters
public List<ColumnValueParameter> getParameters()
Description copied from interface:TableMutation
The JDBC parameters associated with this mutation. The order here is the expected binding order for thePreparedStatement
.- Specified by:
getParameters
in 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: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>
- 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:
createMutationOperation
in interfaceTableMutation<O extends MutationOperation>
-
createMutationOperation
public final O createMutationOperation(String sql, List<JdbcParameterBinder> parameterBinders)
Intended for use fromSqlAstTranslator
- Specified by:
createMutationOperation
in 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
-
-