Interface Frame

  • All Superinterfaces:
    Collection<Item>, Iterable<Item>
    All Known Implementing Classes:
    ReFrame

    @Immutable
    public interface Frame
    extends Collection<Item>
    DynamoDB frame (subset of a table).

    Frame is a subset of a Dynamo table, and is used to retrieve items and remove them. Frame acts as an iterable immutable collection of items. You can't use Collection.remove(Object) method directly. Instead, find the right item using iterator and than remove it with Iterator.remove().

    To fetch items from Dynamo DB, Frame uses Query operation, with "consistent read" mode turned ON. It fetches twenty items on every request.

    Keep in mind that Frame object provides a very limited functionality and is intended to be used in most cases, but not in all of them. When you need something specific, just get an Amazon DynamoDB client from a Region and use Amazon SDK methods directly.

    Since:
    0.1
    See Also:
    Item, Query and Scan
    • Method Detail

      • where

        Frame where​(String name,
                    String value)
        Refine using this EQ condition argument.
        Parameters:
        name - Attribute name
        value - String value expected
        Returns:
        New frame
        Since:
        0.7.21
      • where

        Frame where​(String name,
                    com.amazonaws.services.dynamodbv2.model.Condition condition)
        Refine using this condition.

        It is recommended to use a utility static method Conditions.equalTo(Object), when condition is simply an equation to a plain string value.

        Parameters:
        name - Attribute name
        condition - The condition
        Returns:
        New frame
      • where

        Frame where​(Map<String,​com.amazonaws.services.dynamodbv2.model.Condition> conditions)
        Refine using these conditions.

        It is recommended to use Conditions supplementary class instead of a raw Map.

        Parameters:
        conditions - The conditions
        Returns:
        New frame
        See Also:
        Conditions
      • table

        Table table()
        Get back to the table this frame came from.
        Returns:
        The table
      • through

        Frame through​(Valve valve)
        Change valve for items fetching.
        Parameters:
        valve - The valve to go through
        Returns:
        New frame
        Since:
        0.7.21