Class CrossEntityResult

java.lang.Object
dev.hogwai.dynamodb.simplified.entity.CrossEntityResult

public final class CrossEntityResult extends Object
Groups items retrieved from a cross-entity query by their entity type.

Each entity type included in the query has its matching items collected in a separate list, accessible by the entity class.

  • Method Details

    • get

      public <T> @NonNull List<T> get(@NonNull Class<T> entityClass)
      Returns the list of items for the given entity type.
      Type Parameters:
      T - the entity type
      Parameters:
      entityClass - the entity class to retrieve items for
      Returns:
      the list of matching items, or an empty list if none
    • getAll

      public @NonNull Map<Class<?>,List<?>> getAll()
      Returns the raw map of entity class to item lists.
      Returns:
      an unmodifiable map of entity types to their items
    • isEmpty

      public boolean isEmpty()
      Returns whether all entity type lists in this result are empty.
      Returns:
      true if no items of any type were returned
    • size

      public int size()
      Returns the total number of items across all entity types.
      Returns:
      the total item count