@Immutable public interface Frame extends Collection<Item>
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.
Item
,
Query and ScanModifier and Type | Method and Description |
---|---|
Table |
table()
Get back to the table this frame came from.
|
Frame |
through(Valve valve)
Change valve for items fetching.
|
Frame |
where(Map<String,com.amazonaws.services.dynamodbv2.model.Condition> conditions)
Refine using these conditions.
|
Frame |
where(String name,
com.amazonaws.services.dynamodbv2.model.Condition condition)
Refine using this condition.
|
Frame |
where(String name,
String value)
Refine using this EQ condition argument.
|
@NotNull(message="frame is never NULL") Frame where(@NotNull(message="attribute name can\'t be NULL") String name, @NotNull(message="value can\'t be NULL") String value)
name
- Attribute namevalue
- String value expected@NotNull(message="new frame is never NULL") Frame where(@NotNull(message="attribute name can\'t be NULL") String name, @NotNull(message="condition can\'t be NULL") com.amazonaws.services.dynamodbv2.model.Condition condition)
It is recommended to use a utility static method
Conditions.equalTo(Object)
, when condition is simply an
equation to a plain string value.
name
- Attribute namecondition
- The condition@NotNull(message="frame is never NULL") Frame where(@NotNull(message="conditions can\'t be NULL") Map<String,com.amazonaws.services.dynamodbv2.model.Condition> conditions)
It is recommended to use Conditions
supplementary class
instead of a raw Map
.
conditions
- The conditionsConditions
@NotNull(message="table is never NULL") Table table()
Copyright © 2012–2014 jcabi.com. All rights reserved.