Record Class AbstractCrossTableBatchWriteBuilder.Operation
java.lang.Object
java.lang.Record
dev.hogwai.dynamodb.simplified.builder.base.AbstractCrossTableBatchWriteBuilder.Operation
- Record Components:
type- the operation type (PUT or DELETE)table- the table reference (eitherDynamoDbTableorDynamoDbAsyncTable)item- the item to put, ornullfor delete operationspartitionKey- the partition key value for delete operations, ornullfor put operationssortKey- the sort key value for delete operations, ornullfor put operations or tables without a sort key
- Enclosing class:
AbstractCrossTableBatchWriteBuilder<S extends AbstractCrossTableBatchWriteBuilder<S>>
public static record AbstractCrossTableBatchWriteBuilder.Operation(AbstractCrossTableBatchWriteBuilder.Operation.Type type, Object table, @Nullable Object item, @Nullable Object partitionKey, @Nullable Object sortKey)
extends Record
Stores a table reference, operation type, and optional item or key values.
The table is stored as
Object to accommodate both Table
and AsyncTable types without coupling the base to either package.-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumThe type of batch write operation. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.@Nullable Objectitem()Returns the value of theitemrecord component.@Nullable ObjectReturns the value of thepartitionKeyrecord component.@Nullable ObjectsortKey()Returns the value of thesortKeyrecord component.table()Returns the value of thetablerecord component.final StringtoString()Returns a string representation of this record class.type()Returns the value of thetyperecord component.
-
Constructor Details
-
Operation
public Operation(AbstractCrossTableBatchWriteBuilder.Operation.Type type, Object table, @Nullable Object item, @Nullable Object partitionKey, @Nullable Object sortKey) Creates an instance of aOperationrecord class.- Parameters:
type- the value for thetyperecord componenttable- the value for thetablerecord componentitem- the value for theitemrecord componentpartitionKey- the value for thepartitionKeyrecord componentsortKey- the value for thesortKeyrecord component
-
-
Method Details
-
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. All components in this record class are compared withObjects::equals(Object,Object). -
type
-
table
-
item
-
partitionKey
Returns the value of thepartitionKeyrecord component.- Returns:
- the value of the
partitionKeyrecord component
-
sortKey
-