Top Description Fields Constructors Methods
org.hibernate.sql.model.jdbc

public Class OptionalTableUpdateOperation

extends Object
implements SelfExecutingUpdateOperation
Class Inheritance
All Implemented Interfaces
org.hibernate.sql.model.SelfExecutingUpdateOperation, org.hibernate.sql.model.MutationOperation
Imports
java.sql.PreparedStatement, .SQLException, java.util.Collections, .Iterator, .List, .Locale, .Objects, .Set, org.hibernate.engine.jdbc.mutation.JdbcValueBindings, .ParameterUsage, org.hibernate.engine.jdbc.mutation.group.PreparedStatementDetails, org.hibernate.engine.jdbc.mutation.internal.JdbcValueDescriptorImpl, .MutationQueryOptions, .PreparedStatementGroupSingleTable, org.hibernate.engine.jdbc.mutation.spi.Binding, .BindingGroup, org.hibernate.engine.jdbc.spi.JdbcCoordinator, .MutationStatementPreparer, org.hibernate.engine.spi.SessionFactoryImplementor, .SharedSessionContractImplementor, org.hibernate.internal.util.collections.CollectionHelper, org.hibernate.jdbc.Expectation, org.hibernate.persister.entity.mutation.EntityMutationTarget, .EntityTableMapping, .UpdateValuesAnalysis, org.hibernate.sql.ast.SqlAstTranslator, .SqlAstTranslatorFactory, org.hibernate.sql.model.MutationTarget, .MutationType, .PreparableMutationOperation, .SelfExecutingUpdateOperation, .TableMapping, .ValuesAnalysis, org.hibernate.sql.model.ast.ColumnValueBinding, .ColumnValueParameter, .MutatingTableReference, .TableDelete, .TableInsert, .TableUpdate, org.hibernate.sql.model.internal.OptionalTableUpdate, .TableDeleteCustomSql, .TableDeleteStandard, .TableInsertCustomSql, .TableInsertStandard, .TableUpdateCustomSql, .TableUpdateStandard

Legacy "upsert" handling, conditionally using INSERT, UPDATE and DELETE statements as required for optional secondary tables.
Author
Steve Ebersole

Field Summary

Modifier and TypeField and Description
private final Expectation
private final List<JdbcValueDescriptor>
private final List<ColumnValueBinding>
private final EntityMutationTarget
private final List<ColumnValueBinding>
private final List<ColumnValueParameter>
private final EntityTableMapping
private final List<ColumnValueBinding>

Constructor Summary

AccessConstructor and Description
public
OptionalTableUpdateOperation(MutationTarget<?> mutationTarget, OptionalTableUpdate upsert, SessionFactoryImplementor factory)

Deprecated as a consequence of SessionFactoryImplementor being deprecated.

Method Summary

Modifier and TypeMethod and Description
private static void
bindKeyValue(int jdbcPosition, Binding binding, JdbcValueDescriptor valueDescriptor, PreparedStatement statement, String sql, EntityTableMapping tableMapping, SharedSessionContractImplementor session)

private void
private JdbcDeleteMutation
private JdbcInsertMutation
private static PreparedStatement
public JdbcValueDescriptor
findValueDescriptor(String columnName, ParameterUsage usage)

Implements org.hibernate.sql.model.MutationOperation.findValueDescriptor.

Find the JDBC parameter to be used for the specified column.
public MutationTarget<?>
public MutationType
getMutationType()

Implements org.hibernate.sql.model.MutationOperation.getMutationType.

The type of operation (INSERT, etc)
public TableMapping
getTableDetails()

Implements org.hibernate.sql.model.MutationOperation.getTableDetails.

The table against which operation is to be performed
private void
private void
public void
private boolean
public String
toString()

Overrides java.lang.Object.toString.

Returns a string representation of the object.
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAllwaitwaitwait

Field Detail

expectationback to summary
private final Expectation expectation
jdbcValueDescriptorsback to summary
private final List<JdbcValueDescriptor> jdbcValueDescriptors
keyBindingsback to summary
private final List<ColumnValueBinding> keyBindings
mutationTargetback to summary
private final EntityMutationTarget mutationTarget
optimisticLockBindingsback to summary
private final List<ColumnValueBinding> optimisticLockBindings
parametersback to summary
private final List<ColumnValueParameter> parameters
tableMappingback to summary
private final EntityTableMapping tableMapping
valueBindingsback to summary
private final List<ColumnValueBinding> valueBindings

Constructor Detail

OptionalTableUpdateOperationback to summary
public OptionalTableUpdateOperation(MutationTarget<?> mutationTarget, OptionalTableUpdate upsert, SessionFactoryImplementor factory)

Deprecated

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

Method Detail

bindKeyValueback to summary
private static void bindKeyValue(int jdbcPosition, Binding binding, JdbcValueDescriptor valueDescriptor, PreparedStatement statement, String sql, EntityTableMapping tableMapping, SharedSessionContractImplementor session)
bindKeyValuesback to summary
private void bindKeyValues(JdbcValueBindings jdbcValueBindings, PreparedStatement statement, JdbcDeleteMutation jdbcDelete, SharedSessionContractImplementor session)
createJdbcDeleteback to summary
private JdbcDeleteMutation createJdbcDelete(SharedSessionContractImplementor session)
createJdbcInsertback to summary
private JdbcInsertMutation createJdbcInsert(SharedSessionContractImplementor session)
createStatementDetailsback to summary
private static PreparedStatement createStatementDetails(PreparableMutationOperation operation, SharedSessionContractImplementor session)
findValueDescriptorback to summary
public JdbcValueDescriptor findValueDescriptor(String columnName, ParameterUsage usage)

Implements org.hibernate.sql.model.MutationOperation.findValueDescriptor.

Doc from org.hibernate.sql.model.MutationOperation.findValueDescriptor.

Find the JDBC parameter to be used for the specified column.

Returns:JdbcValueDescriptor

The descriptor, or null if none match.

Annotations
@Override
getMutationTargetback to summary
public MutationTarget<?> getMutationTarget()

Implements org.hibernate.sql.model.MutationOperation.getMutationTarget.

Doc from org.hibernate.sql.model.MutationOperation.getMutationTarget.

The thing being mutated

Annotations
@Override
getMutationTypeback to summary
public MutationType getMutationType()

Implements org.hibernate.sql.model.MutationOperation.getMutationType.

Doc from org.hibernate.sql.model.MutationOperation.getMutationType.

The type of operation (INSERT, etc)

Annotations
@Override
getTableDetailsback to summary
public TableMapping getTableDetails()

Implements org.hibernate.sql.model.MutationOperation.getTableDetails.

Doc from org.hibernate.sql.model.MutationOperation.getTableDetails.

The table against which operation is to be performed

Annotations
@Override
performDeleteback to summary
private void performDelete(JdbcValueBindings jdbcValueBindings, SharedSessionContractImplementor session)
performInsertback to summary
private void performInsert(JdbcValueBindings jdbcValueBindings, SharedSessionContractImplementor session)
performMutationback to summary
public void performMutation(JdbcValueBindings jdbcValueBindings, ValuesAnalysis incomingValuesAnalysis, SharedSessionContractImplementor session)

Implements org.hibernate.sql.model.SelfExecutingUpdateOperation.performMutation.

Annotations
@Override
performUpdateback to summary
private boolean performUpdate(JdbcValueBindings jdbcValueBindings, SharedSessionContractImplementor session)
toStringback to summary
public String toString()

Overrides java.lang.Object.toString.

Doc from java.lang.Object.toString.

Returns a string representation of the object.

Returns:String

a string representation of the object.

Annotations
@Override