Top Description Methods
org.hibernate.sql.model.ast

public Interface TableMutation<O extends org.hibernate.sql.model.MutationOperation>

extends Statement
Known Direct Subinterfaces
org.hibernate.sql.model.ast.CustomSqlMutation, org.hibernate.sql.model.ast.RestrictedTableMutation, org.hibernate.sql.model.ast.TableInsert
Known Direct Implementers
org.hibernate.sql.model.ast.AbstractTableMutation
Imports
java.util.List, java.util.function.Consumer, org.hibernate.engine.spi.SessionFactoryImplementor, org.hibernate.jdbc.Expectation, org.hibernate.sql.ast.tree.Statement, org.hibernate.sql.exec.spi.JdbcParameterBinder, org.hibernate.sql.model.MutationOperation, .ValuesAnalysis

Describes the mutation of a model table (mapped by an entity or collection) triggered from flush.

Modeled as a SQL AST and processed via org.hibernate.sql.ast.SqlAstTranslator

Acts as a factory for org.hibernate.sql.model.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 java.sql.PreparedStatement - see getParameters() and forEachParameter

Author
Steve Ebersole

Method Summary

Modifier and TypeMethod and Description
public O
createMutationOperation(ValuesAnalysis valuesAnalysis, SessionFactoryImplementor sessionFactory)

Deprecated as a consequence of SessionFactoryImplementor being deprecated.
public O
createMutationOperation(String sql, List<JdbcParameterBinder> parameterBinders)

A org.hibernate.sql.ast.SqlAstTranslator callback to create an appropriate mutation using the translated sql and parameter binders.

public void
forEachParameter(Consumer<ColumnValueParameter> consumer)

Visit the JDBC parameters associated with this mutation.

public Expectation
getExpectation()

The validation expectation for the mutation

public MutatingTableReference
getMutatingTable()

The table being mutated

public String
getMutationComment()

The comment to be used in the SQL if enabled and supported

public List<ColumnValueParameter>
getParameters()

The JDBC parameters associated with this mutation.

public default String
getTableName()

The name of the table being mutated.

public boolean
isCallable()

Is the mutation a procedure/function?

Inherited from org.hibernate.sql.ast.tree.Statement:
accept

Method Detail

createMutationOperationback to summary
public O createMutationOperation(ValuesAnalysis valuesAnalysis, SessionFactoryImplementor sessionFactory)

Deprecated

as a consequence of SessionFactoryImplementor being deprecated. See corresponding docs for further information.

createMutationOperationback to summary
public O createMutationOperation(String sql, List<JdbcParameterBinder> parameterBinders)

A org.hibernate.sql.ast.SqlAstTranslator callback to create an appropriate mutation using the translated sql and parameter binders.

forEachParameterback to summary
public void forEachParameter(Consumer<ColumnValueParameter> consumer)

Visit the JDBC parameters associated with this mutation. The order here is the expected binding order for the java.sql.PreparedStatement.

See Also
getParameters
getExpectationback to summary
public Expectation getExpectation()

The validation expectation for the mutation

getMutatingTableback to summary
public MutatingTableReference getMutatingTable()

The table being mutated

getMutationCommentback to summary
public String getMutationComment()

The comment to be used in the SQL if enabled and supported

getParametersback to summary
public List<ColumnValueParameter> getParameters()

The JDBC parameters associated with this mutation. The order here is the expected binding order for the java.sql.PreparedStatement.

See Also
forEachParameter
getTableNameback to summary
public default String getTableName()

The name of the table being mutated.

See Also
getMutatingTable()
isCallableback to summary
public boolean isCallable()

Is the mutation a procedure/function?