Package org.hibernate.sql.model.ast
Interface TableMutation<O extends MutationOperation>
-
- All Superinterfaces:
Statement
- All Known Subinterfaces:
CustomSqlMutation<O>
,RestrictedTableMutation<O>
,TableDelete
,TableInsert
,TableUpdate<O>
- All Known Implementing Classes:
AbstractRestrictedTableMutation
,AbstractTableDelete
,AbstractTableInsert
,AbstractTableMutation
,AbstractTableUpdate
,OptionalTableUpdate
,TableDeleteCustomSql
,TableDeleteStandard
,TableInsertCustomSql
,TableInsertStandard
,TableUpdateCustomSql
,TableUpdateNoSet
,TableUpdateStandard
public interface TableMutation<O extends MutationOperation> extends Statement
Describes the mutation of a model table (mapped by an entity or collection) triggered from flush.Modeled as a SQL AST and processed via
SqlAstTranslator
Acts as a factory for
MutationOperation
instances, which are the forms used to "perform" the mutation using JDBC.- API Note:
- The parameter order returned from here is the expected order of binding
to the
PreparedStatement
- seegetParameters()
andforEachParameter(java.util.function.Consumer<org.hibernate.sql.model.ast.ColumnValueParameter>)
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description O
createMutationOperation(String sql, List<JdbcParameterBinder> parameterBinders)
ASqlAstTranslator
callback to create an appropriate mutation using the translated sql and parameter binders.O
createMutationOperation(ValuesAnalysis valuesAnalysis, SessionFactoryImplementor sessionFactory)
void
forEachParameter(Consumer<ColumnValueParameter> consumer)
Visit the JDBC parameters associated with this mutation.Expectation
getExpectation()
The validation expectation for the mutationMutatingTableReference
getMutatingTable()
The table being mutatedString
getMutationComment()
The comment to be used in the SQL if enabled and supportedList<ColumnValueParameter>
getParameters()
The JDBC parameters associated with this mutation.default String
getTableName()
The name of the table being mutated.boolean
isCallable()
Is the mutation a procedure/function?
-
-
-
Method Detail
-
getMutatingTable
MutatingTableReference getMutatingTable()
The table being mutated
-
getTableName
default String getTableName()
The name of the table being mutated.- See Also:
getMutatingTable()
-
getMutationComment
String getMutationComment()
The comment to be used in the SQL if enabled and supported
-
isCallable
boolean isCallable()
Is the mutation a procedure/function?
-
getExpectation
Expectation getExpectation()
The validation expectation for the mutation
-
getParameters
List<ColumnValueParameter> getParameters()
The JDBC parameters associated with this mutation. The order here is the expected binding order for thePreparedStatement
.
-
forEachParameter
void forEachParameter(Consumer<ColumnValueParameter> consumer)
Visit the JDBC parameters associated with this mutation. The order here is the expected binding order for thePreparedStatement
.- See Also:
getParameters()
-
createMutationOperation
O createMutationOperation(ValuesAnalysis valuesAnalysis, SessionFactoryImplementor sessionFactory)
-
createMutationOperation
O createMutationOperation(String sql, List<JdbcParameterBinder> parameterBinders)
ASqlAstTranslator
callback to create an appropriate mutation using the translated sql and parameter binders.
-
-