Interface EntityTable<T>
- Type Parameters:
T- the entity type, annotated with@Entity
public interface EntityTable<T>
Typed interface for single-table design operations on a DynamoDB table.
Provides high-level methods that automatically compute composite keys
from @KeyComponent-annotated fields and filter by
discriminator on query operations.
-
Method Summary
Modifier and TypeMethodDescriptionvoidDeletes an item by its computed partition key.voidDeletes an item by its computed partition and sort keys.@Nullable TGets an item by its composite partition key value.@Nullable TGets an item by its composite partition and sort keys.voidPuts an item, auto-computing composite keys and setting discriminator.Queries items sharing this partition key, auto-filtering by discriminator.@NonNull EntitySchema<T> schema()Returns theEntitySchemafor this entity type.@NonNull StringReturns the DynamoDB table name associated with this entity.voidUpdates an item, auto-computing composite keys.
-
Method Details
-
tableName
@NonNull String tableName()Returns the DynamoDB table name associated with this entity.- Returns:
- the table name
-
schema
@NonNull EntitySchema<T> schema()Returns theEntitySchemafor this entity type.- Returns:
- the entity schema
-
put
Puts an item, auto-computing composite keys and setting discriminator.- Parameters:
entity- the entity to put
-
get
-
get
-
query
-
delete
Deletes an item by its computed partition key.- Parameters:
partitionKey- the computed partition key value
-
delete
-
update
Updates an item, auto-computing composite keys.- Parameters:
entity- the entity with updated values
-