Class AbstractTableUpdateBuilder<O extends MutationOperation>
java.lang.Object
org.hibernate.sql.ast.spi.model.builder.AbstractTableMutationBuilder<RestrictedTableMutation<O>>
org.hibernate.sql.ast.spi.model.builder.AbstractRestrictedTableMutationBuilder<O, RestrictedTableMutation<O>>
org.hibernate.sql.ast.spi.model.builder.AbstractTableUpdateBuilder<O>
- All Implemented Interfaces:
SelectableConsumer, AssigningTableMutationBuilder<RestrictedTableMutation<O>>, RestrictedTableMutationBuilder<O, RestrictedTableMutation<O>>, TableMutationBuilder<RestrictedTableMutation<O>>, TableUpdateBuilder<O>
- Direct Known Subclasses:
TableUpdateBuilderStandard
@SPI(IMPLEMENT)
public abstract class AbstractTableUpdateBuilder<O extends MutationOperation>
extends AbstractRestrictedTableMutationBuilder<O, RestrictedTableMutation<O>>
implements TableUpdateBuilder<O>
Base for provider-owned TableUpdateBuilder implementations.
Extend this class to customize construction of an update operation while retaining standard assignment, restriction, and LOB-ordering behavior.
- Since:
- 8.0
-
Field Summary
Fields inherited from interface TableMutationBuilder
NOT_NULL, NULL -
Constructor Summary
ConstructorsConstructorDescriptionAbstractTableUpdateBuilder(MutationTarget mutationTarget, MutatingTableReference tableReference, SessionFactoryImplementor sessionFactory) Create an update builder using the supplied mutating-table reference.AbstractTableUpdateBuilder(MutationTarget mutationTarget, TableMapping tableMapping, SessionFactoryImplementor sessionFactory) Create an update builder which owns a new reference totableMapping. -
Method Summary
Modifier and TypeMethodDescriptionvoidaddColumnAssignment(SelectableMapping columnMapping, String assignment) Adds a column assignment defined bycolumnMapping = assignmentvoidaddColumnAssignment(ColumnValueBinding valueBinding) Adds a column assignment defined by the givencolumnValueBinding, which represents a column and its assignment .protected List<ColumnValueBinding> The bindings for each key restriction (WHERE clause).protected List<ColumnValueBinding> protected List<ColumnValueBinding> The (non-LOB) bindings for each column being updated (SET clause)booleanWhether this builder currently contains any assignment bindings.voidsetSqlComment(String sqlComment) Methods inherited from class AbstractRestrictedTableMutationBuilder
addKeyRestrictionBinding, addNonKeyRestriction, addNonKeyRestriction, addNullOptimisticLockRestriction, addOptimisticLockRestriction, addWhereFragment, adjustCustomSqlTenantRestriction, getKeyRestrictionBindings, getOptimisticLockBindings, setWhereMethods inherited from class AbstractTableMutationBuilder
addColumn, combine, createValueBinding, createValueBinding, getJdbcServices, getMutatingTable, getMutationTarget, getParameters, getSessionFactory, toStringMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface AssigningTableMutationBuilder
addColumnAssignment, addColumnAssignment, addValueColumn, addValueColumn, addValueColumn, addValueColumn, hasValueBindingsMethods inherited from interface RestrictedTableMutationBuilder
addKeyRestriction, addKeyRestrictionBinding, addKeyRestrictionLeniently, addKeyRestrictions, addKeyRestrictionsLeniently, addNonKeyRestriction, addNonKeyRestriction, addNonKeyRestriction, addNullOptimisticLockRestriction, addNullRestriction, addOptimisticLockRestriction, addOptimisticLockRestriction, addOptimisticLockRestrictions, addWhereFragment, getKeyRestrictionBindings, getOptimisticLockBindingsMethods inherited from interface SelectableConsumer
accept, accept, acceptMethods inherited from interface TableMutationBuilder
getMutatingTableMethods inherited from interface TableUpdateBuilder
accept, buildMutation, setWhere
-
Constructor Details
-
AbstractTableUpdateBuilder
@SPI(IMPLEMENT) public AbstractTableUpdateBuilder(MutationTarget mutationTarget, TableMapping tableMapping, SessionFactoryImplementor sessionFactory) Create an update builder which owns a new reference totableMapping. -
AbstractTableUpdateBuilder
@SPI(IMPLEMENT) public AbstractTableUpdateBuilder(MutationTarget mutationTarget, MutatingTableReference tableReference, SessionFactoryImplementor sessionFactory) Create an update builder using the supplied mutating-table reference.
-
-
Method Details
-
getSqlComment
-
setSqlComment
-
getKeyBindings
The bindings for each key restriction (WHERE clause).- See Also:
-
getValueBindings
The (non-LOB) bindings for each column being updated (SET clause)- See Also:
-
getLobValueBindings
- See Also:
- API Note:
- The distinction with
getValueBindings()is to help in cases e.g. where a dialect needs to order all LOB bindings after all non-LOB bindings
-
hasAssignmentBindings
public boolean hasAssignmentBindings()Description copied from interface:AssigningTableMutationBuilderWhether this builder currently contains any assignment bindings.- Specified by:
hasAssignmentBindingsin interfaceAssigningTableMutationBuilder<O extends MutationOperation>
-
addColumnAssignment
Description copied from interface:AssigningTableMutationBuilderAdds a column assignment defined by the givencolumnValueBinding, which represents a column and its assignment .- Specified by:
addColumnAssignmentin interfaceAssigningTableMutationBuilder<O extends MutationOperation>
-
addColumnAssignment
Description copied from interface:AssigningTableMutationBuilderAdds a column assignment defined bycolumnMapping = assignment- Specified by:
addColumnAssignmentin interfaceAssigningTableMutationBuilder<O extends MutationOperation>
-