Record Class StatementShapeKey
java.lang.Object
java.lang.Record
org.hibernate.action.queue.spi.StatementShapeKey
- All Implemented Interfaces:
org.hibernate.action.queue.internal.support.OperationGroupKey, BatchKey
@Incubating
public record StatementShapeKey(String tableExpression, MutationKind kind, int shapeHash)
extends Record
implements BatchKey, org.hibernate.action.queue.internal.support.OperationGroupKey
Helps identify similar mutations more concretely that just type+table. This
takes into consideration shapeHash as well, which might be based on columns
included / not included, etc.
Useful as a key for batching.
- Since:
- 8.0
-
Constructor Summary
ConstructorsConstructorDescriptionStatementShapeKey(String tableExpression, MutationKind kind, int shapeHash) Creates an instance of aStatementShapeKeyrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.static StatementShapeKeyforDelete(String tableName, FlushOperation flushOperation) static StatementShapeKeyforInsert(String tableName, FlushOperation flushOperation) static StatementShapeKeyforMutation(String tableName, MutationKind kind, TableDescriptor tableDescriptor, MutationOperation mutationOperation) static StatementShapeKeystatic StatementShapeKeyforUpdate(String tableName, FlushOperation flushOperation) static StatementShapeKeyforUpdateOrder(String tableName, FlushOperation flushOperation) final inthashCode()Returns a hash code value for this object.kind()Returns the value of thekindrecord component.intReturns the value of theshapeHashrecord component.Returns the value of thetableExpressionrecord component.final StringtoString()Returns a string representation of this record class.Methods inherited from interface BatchKey
toLoggableString
-
Constructor Details
-
StatementShapeKey
Creates an instance of aStatementShapeKeyrecord class.- Parameters:
tableExpression- the value for thetableExpressionrecord componentkind- the value for thekindrecord componentshapeHash- the value for theshapeHashrecord component
-
-
Method Details
-
forInsert
-
forUpdate
-
forUpdateOrder
-
forDelete
-
forNoOp
-
forMutation
public static StatementShapeKey forMutation(String tableName, MutationKind kind, TableDescriptor tableDescriptor, MutationOperation mutationOperation) -
toString
-
hashCode
-
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with thecomparemethod from their corresponding wrapper classes. -
tableExpression
Returns the value of thetableExpressionrecord component.- Returns:
- the value of the
tableExpressionrecord component
-
kind
Returns the value of thekindrecord component.- Returns:
- the value of the
kindrecord component
-
shapeHash
public int shapeHash()Returns the value of theshapeHashrecord component.- Returns:
- the value of the
shapeHashrecord component
-