Package com.jcabi.dynamo
Class QueryValve
java.lang.Object
com.jcabi.dynamo.QueryValve
- All Implemented Interfaces:
Valve
Query-based valve.
- Since:
- 0.1
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintcount(Credentials credentials, String table, Map<String, software.amazon.awssdk.services.dynamodb.model.Condition> conditions) Count items.fetch(Credentials credentials, String table, Map<String, software.amazon.awssdk.services.dynamodb.model.Condition> conditions, Collection<String> keys) Fetch the first dosage.withAttributesToGet(String... names) With these extra attributes to pre-fetch.withAttributeToGet(String name) With this extra attribute to pre-fetch.withConsistentRead(boolean cnst) With consistent read.withIndexName(String idx) With index name.withLimit(int lmt) With given limit.withScanIndexForward(boolean fwd) With scan index forward flag.withSelect(software.amazon.awssdk.services.dynamodb.model.Select slct) With attributes to select.
-
Constructor Details
-
QueryValve
public QueryValve()Public ctor.
-
-
Method Details
-
fetch
public Dosage fetch(Credentials credentials, String table, Map<String, software.amazon.awssdk.services.dynamodb.model.Condition> conditions, Collection<String> keys) throws IOExceptionDescription copied from interface:ValveFetch the first dosage.- Specified by:
fetchin 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, software.amazon.awssdk.services.dynamodb.model.Condition> conditions) throws IOExceptionDescription copied from interface:ValveCount items.- Specified by:
countin interfaceValve- Parameters:
credentials- Credentials to AWStable- Table nameconditions- Conditions- Returns:
- Total count of the
- Throws:
IOException- In case of DynamoDB failure
-
withConsistentRead
With consistent read.- Parameters:
cnst- Consistent read- Returns:
- New query valve
- Since:
- 0.12
- See Also:
-
QueryRequest.consistentRead()
- Suppressed Checkstyle violations:
- AvoidDuplicateLiterals (5 line)
-
withIndexName
With index name.- Parameters:
idx- Index name- Returns:
- New query valve
- Since:
- 0.10.2
- See Also:
-
QueryRequest.indexName()
- Suppressed Checkstyle violations:
- AvoidDuplicateLiterals (5 line)
-
withSelect
With attributes to select.- Parameters:
slct- Select to use- Returns:
- New query valve
- Since:
- 0.10.2
- See Also:
-
QueryRequest.select()
- Suppressed Checkstyle violations:
- AvoidDuplicateLiterals (5 line)
-
withLimit
With given limit.- Parameters:
lmt- Limit to use- Returns:
- New query valve
- See Also:
-
QueryRequest.limit()
- Suppressed Checkstyle violations:
- AvoidDuplicateLiterals (5 line)
-
withScanIndexForward
With scan index forward flag.- Parameters:
fwd- Forward flag- Returns:
- New query valve
- See Also:
-
QueryRequest.scanIndexForward()
- Suppressed Checkstyle violations:
- AvoidDuplicateLiterals (5 line)
-
withAttributeToGet
With this extra attribute to pre-fetch.- Parameters:
name- Name of attribute to pre-load- Returns:
- New query valve
- See Also:
-
QueryRequest.attributesToGet()
- Suppressed Checkstyle violations:
- AvoidDuplicateLiterals (5 line)
-
withAttributesToGet
With these extra attributes to pre-fetch.- Parameters:
names- Name of attributes to pre-load- Returns:
- New query valve
- See Also:
-
QueryRequest.attributesToGet()
- Suppressed Checkstyle violations:
- AvoidDuplicateLiterals (5 line)
-