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
SqlAstTranslatorActs as a factory for
MutationOperationinstances, 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 OcreateMutationOperation(String sql, List<JdbcParameterBinder> parameterBinders)ASqlAstTranslatorcallback to create an appropriate mutation using the translated sql and parameter binders.OcreateMutationOperation(ValuesAnalysis valuesAnalysis, SessionFactoryImplementor sessionFactory)voidforEachParameter(Consumer<ColumnValueParameter> consumer)Visit the JDBC parameters associated with this mutation.ExpectationgetExpectation()The validation expectation for the mutationMutatingTableReferencegetMutatingTable()The table being mutatedStringgetMutationComment()The comment to be used in the SQL if enabled and supportedList<ColumnValueParameter>getParameters()The JDBC parameters associated with this mutation.default StringgetTableName()The name of the table being mutated.booleanisCallable()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)
ASqlAstTranslatorcallback to create an appropriate mutation using the translated sql and parameter binders.
-
-