Package com.jcabi.dynamo
Class ScanValve
- java.lang.Object
-
- com.jcabi.dynamo.ScanValve
-
-
Constructor Summary
Constructors Constructor Description ScanValve()
Public ctor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
count(Credentials credentials, String table, Map<String,com.amazonaws.services.dynamodbv2.model.Condition> conditions)
Count items.Dosage
fetch(Credentials credentials, String table, Map<String,com.amazonaws.services.dynamodbv2.model.Condition> conditions, Collection<String> keys)
Fetch the first dosage.ScanValve
withAttributeToGet(String name)
With this extra attribute to pre-fetch.ScanValve
withAttributeToGet(String... names)
With these extra attributes to pre-fetch.ScanValve
withLimit(int lmt)
With given limit.
-
-
-
Method Detail
-
fetch
public Dosage fetch(Credentials credentials, String table, Map<String,com.amazonaws.services.dynamodbv2.model.Condition> conditions, Collection<String> keys) throws IOException
Description copied from interface:Valve
Fetch the first dosage.- Specified by:
fetch
in interfaceValve
- Parameters:
credentials
- Credentials to AWStable
- Table nameconditions
- Conditionskeys
- Keys of the table- Returns:
- Dosage
- Throws:
IOException
- In case of DynamoDB failure
-
count
public int count(Credentials credentials, String table, Map<String,com.amazonaws.services.dynamodbv2.model.Condition> conditions)
Description copied from interface:Valve
Count items.
-
withLimit
public ScanValve withLimit(int lmt)
With given limit.- Parameters:
lmt
- Limit to use- Returns:
- New query valve
-
withAttributeToGet
public ScanValve withAttributeToGet(String name)
With this extra attribute to pre-fetch.- Parameters:
name
- Name of attribute to pre-load- Returns:
- New query valve
-
-