Record Class AbstractTransactWriteBuilder.Operation
java.lang.Object
java.lang.Record
dev.hogwai.dynamodb.simplified.builder.base.AbstractTransactWriteBuilder.Operation
- Record Components:
type- the operation typetable- the table reference (eitherDynamoDbTableorDynamoDbAsyncTable)item- the item to put or update, ornullfor delete/condition checkpartitionKey- the partition key value for delete/condition check, ornullfor put/updatesortKey- the sort key value for delete/condition check, ornullfor put/update or tables without a sort keyconditionExpression- optional condition expression for condition check operationsupdateExpression- optional update expression for update-with-expression operations
- Enclosing class:
AbstractTransactWriteBuilder<S extends AbstractTransactWriteBuilder<S>>
public static record AbstractTransactWriteBuilder.Operation(AbstractTransactWriteBuilder.Operation.Type type, Object table, @Nullable Object item, @Nullable Object partitionKey, @Nullable Object sortKey, @Nullable ConditionExpression conditionExpression, @Nullable UpdateExpression updateExpression)
extends Record
Stores a table reference, operation type, and optional item, key values,
condition expression, and update expression.
The table is stored as
Object to accommodate both
DynamoDbTable and DynamoDbAsyncTable types without coupling
the base to either package.-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumThe type of transactional write operation. -
Constructor Summary
ConstructorsConstructorDescriptionOperation(AbstractTransactWriteBuilder.Operation.Type type, Object table, @Nullable Object item, @Nullable Object partitionKey, @Nullable Object sortKey, @Nullable ConditionExpression conditionExpression, @Nullable UpdateExpression updateExpression) Creates an instance of aOperationrecord class. -
Method Summary
Modifier and TypeMethodDescription@Nullable ConditionExpressionReturns the value of theconditionExpressionrecord component.final 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.@Nullable UpdateExpressionReturns the value of theupdateExpressionrecord component.
-
Constructor Details
-
Operation
public Operation(AbstractTransactWriteBuilder.Operation.Type type, Object table, @Nullable Object item, @Nullable Object partitionKey, @Nullable Object sortKey, @Nullable ConditionExpression conditionExpression, @Nullable UpdateExpression updateExpression) 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 componentconditionExpression- the value for theconditionExpressionrecord componentupdateExpression- the value for theupdateExpressionrecord 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
-
conditionExpression
Returns the value of theconditionExpressionrecord component.- Returns:
- the value of the
conditionExpressionrecord component
-
updateExpression
Returns the value of theupdateExpressionrecord component.- Returns:
- the value of the
updateExpressionrecord component
-