/** * @see ScanRequest#getAttributesToGet() */ public List<String> getAttributesToGet() { return getRequest().getAttributesToGet(); }
/** * Any query filters will be ignored if a filter expression has been * specified. When a filter expression is specified, the corresponding * name-map and value-map can also be specified via * {@link #withNameMap(Map)} and {@link #withValueMap(Map)}. * * @see ScanRequest#getFilterExpression() */ public String getFilterExpression() { return getRequest().getFilterExpression(); }
/** * @see ScanRequest#getSegment() */ public Integer getSegment() { return getRequest().getSegment(); }
/** * @see ScanRequest#withSegment(Integer) */ public ScanSpec withSegment(Integer segment) { getRequest().setSegment(segment); return this; }
/** * @see ScanRequest#withTotalSegments(Integer) */ public ScanSpec withTotalSegments(Integer totalSegments) { getRequest().setTotalSegments(totalSegments); return this; }
/** * @see ScanRequest#getProjectionExpression() */ public String getProjectionExpression() { return getRequest().getProjectionExpression(); }
/** * @see ScanRequest#getReturnConsumedCapacity() */ public String getReturnConsumedCapacity() { return getRequest().getReturnConsumedCapacity(); }
/** * @see ScanRequest#withSelect(Select) */ public ScanSpec withSelect(Select select) { getRequest().setSelect(select); return this; }
/** * @see ScanRequest#withProjectionExpression(String) */ public ScanSpec withProjectionExpression(String projectionExpression) { getRequest().setProjectionExpression(projectionExpression); return this; }
public ScanCollection(AmazonDynamoDB client, ScanSpec spec) { this.client = client; this.spec = spec; Map<String, AttributeValue> startKey = spec.getRequest() .getExclusiveStartKey(); this.startKey = startKey == null ? null : new LinkedHashMap<String, AttributeValue>(startKey); }
/** * @see ScanRequest#withAttributesToGet(String...) */ public ScanSpec withAttributesToGet(String ... attributes) { if (attributes == null) getRequest().setAttributesToGet(null); else getRequest().setAttributesToGet(Arrays.asList(attributes)); return this; }
/** * @see ScanRequest#withFilterExpression(String) */ public ScanSpec withFilterExpression(String filterExpression) { getRequest().setFilterExpression(filterExpression); return this; }
/** * Specifies the attributes to be returned. * * @see ScanRequest#getSelect() */ // ALL_ATTRIBUTES | ALL_PROJECTED_ATTRIBUTES | SPECIFIC_ATTRIBUTES | COUNT public String getSelect() { return getRequest().getSelect(); }
/** * @see ScanRequest#getTotalSegments() */ public Integer getTotalSegments() { return getRequest().getTotalSegments(); }
/** * AND|OR that applies to all the conditions in the ScanFilters. * * @see ScanRequest#getConditionalOperator() */ public String getConditionalOperator() { return getRequest().getConditionalOperator(); }
/** * @see ScanRequest#withConditionalOperator(ConditionalOperator) */ public ScanSpec withConditionalOperator(ConditionalOperator op) { getRequest().setConditionalOperator(op); return this; }
/** * @see ScanRequest#isConsistentRead() */ public Boolean isConsistentRead() { return getRequest().isConsistentRead(); }
/** * @see ScanRequest#withConsistentRead(Boolean) */ public ScanSpec withConsistentRead(Boolean consistentRead) { getRequest().withConsistentRead(consistentRead); return this; }
@Override protected ItemCollection<ScanOutcome> doScan(ScanSpec spec) { spec.getRequest().setIndexName(index.getIndexName()); return super.doScan(spec); } }
@Override public Page<Item, ScanOutcome> firstPage() { ScanRequest request = spec.getRequest(); request.setExclusiveStartKey(startKey); request.setLimit(InternalUtils.minimum( spec.getMaxResultSize(), spec.getMaxPageSize())); ScanResult result = client.scan(request); ScanOutcome outcome = new ScanOutcome(result); setLastLowLevelResult(outcome); return new ScanPage(client, spec, request, 0, outcome); }