Annotation Interface Entity


@Target(TYPE) @Retention(RUNTIME) @Documented public @interface Entity
Marks a class as an entity type for single-table DynamoDB designs.

The discriminator() value is stored in the discriminatorAttribute() attribute (default "_type") and used by the entity subsystem to identify which entity type a given item represents. The table() specifies the DynamoDB table name.

When used together with @KeyComponent, the entity subsystem automatically computes composite key values and filters queries by discriminator.

  • Required Element Summary

    Required Elements
    Modifier and Type
    Required Element
    Description
    @NonNull String
    The discriminator value stored in the discriminator attribute.
    @NonNull String
    The DynamoDB table name.
  • Optional Element Summary

    Optional Elements
    Modifier and Type
    Optional Element
    Description
    @NonNull String
    The attribute name used to store the discriminator value.
  • Element Details

    • discriminator

      @NonNull String discriminator
      The discriminator value stored in the discriminator attribute.
      Returns:
      the discriminator value
    • discriminatorAttribute

      @NonNull String discriminatorAttribute
      The attribute name used to store the discriminator value.
      Returns:
      the discriminator attribute name
      Default:
      "_type"
    • table

      @NonNull String table
      The DynamoDB table name.
      Returns:
      the table name