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
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
Modifier and TypeMethodDescriptioncreateMutationOperation
(String sql, List<JdbcParameterBinder> parameterBinders) ASqlAstTranslator
callback to create an appropriate mutation using the translated sql and parameter binders.createMutationOperation
(ValuesAnalysis valuesAnalysis, SessionFactoryImplementor sessionFactory) void
forEachParameter
(Consumer<ColumnValueParameter> consumer) Visit the JDBC parameters associated with this mutation.The validation expectation for the mutationThe table being mutatedThe comment to be used in the SQL if enabled and supportedThe JDBC parameters associated with this mutation.default String
The name of the table being mutated.boolean
Is the mutation a procedure/function?
-
Method Details
-
getMutatingTable
MutatingTableReference getMutatingTable()The table being mutated -
getTableName
The name of the table being mutated.- See Also:
-
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
Visit the JDBC parameters associated with this mutation. The order here is the expected binding order for thePreparedStatement
.- See Also:
-
createMutationOperation
-
createMutationOperation
ASqlAstTranslator
callback to create an appropriate mutation using the translated sql and parameter binders.
-