Package org.hibernate.sql.model.jdbc
Class OptionalTableUpdateOperation
- java.lang.Object
-
- org.hibernate.sql.model.jdbc.OptionalTableUpdateOperation
-
- All Implemented Interfaces:
MutationOperation
,SelfExecutingUpdateOperation
public class OptionalTableUpdateOperation extends Object implements SelfExecutingUpdateOperation
Legacy "upsert" handling, conditionally using INSERT, UPDATE and DELETE statements as required for optional secondary tables.
-
-
Constructor Summary
Constructors Constructor Description OptionalTableUpdateOperation(MutationTarget<?> mutationTarget, OptionalTableUpdate upsert, SessionFactoryImplementor factory)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description JdbcValueDescriptor
findValueDescriptor(String columnName, ParameterUsage usage)
Find the JDBC parameter to be used for the specified column.MutationTarget<?>
getMutationTarget()
The thing being mutatedMutationType
getMutationType()
The type of operation (INSERT, etc)TableMapping
getTableDetails()
The table against which operation is to be performedvoid
performMutation(JdbcValueBindings jdbcValueBindings, ValuesAnalysis incomingValuesAnalysis, SharedSessionContractImplementor session)
String
toString()
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.hibernate.sql.model.MutationOperation
getJdbcValueDescriptor
-
-
-
-
Constructor Detail
-
OptionalTableUpdateOperation
public OptionalTableUpdateOperation(MutationTarget<?> mutationTarget, OptionalTableUpdate upsert, SessionFactoryImplementor factory)
-
-
Method Detail
-
getMutationType
public MutationType getMutationType()
Description copied from interface:MutationOperation
The type of operation (INSERT, etc)- Specified by:
getMutationType
in interfaceMutationOperation
-
getMutationTarget
public MutationTarget<?> getMutationTarget()
Description copied from interface:MutationOperation
The thing being mutated- Specified by:
getMutationTarget
in interfaceMutationOperation
-
getTableDetails
public TableMapping getTableDetails()
Description copied from interface:MutationOperation
The table against which operation is to be performed- Specified by:
getTableDetails
in interfaceMutationOperation
-
findValueDescriptor
public JdbcValueDescriptor findValueDescriptor(String columnName, ParameterUsage usage)
Description copied from interface:MutationOperation
Find the JDBC parameter to be used for the specified column.- Specified by:
findValueDescriptor
in interfaceMutationOperation
- Returns:
- The descriptor, or null if none match.
- See Also:
MutationOperation.getJdbcValueDescriptor(java.lang.String, org.hibernate.engine.jdbc.mutation.ParameterUsage)
-
performMutation
public void performMutation(JdbcValueBindings jdbcValueBindings, ValuesAnalysis incomingValuesAnalysis, SharedSessionContractImplementor session)
- Specified by:
performMutation
in interfaceSelfExecutingUpdateOperation
-
-