Java 类com.amazonaws.services.dynamodb.datamodeling.DynamoDBScanExpression 实例源码

项目:ridebuddy    文件:GenericDynamoDbDao.java   
public List<T> scan() {
    DynamoDBScanExpression scanExpression = new DynamoDBScanExpression()
        .withExclusiveStartKey(null)
        .withLimit(LIMIT);

    PaginatedScanList<T> resutlList = getDynamoDbMapper().scan(entityClass, scanExpression);
    List<T> sortedResults = new ArrayList<T>(resutlList);
    Collections.sort(sortedResults);
    return sortedResults;
}
项目:gora-boot    文件:DynamoDBQuery.java   
/**
 * Builds scan query expression using a hash attribute value where to start
 * @param pHashAttrValueHash attribute value where to start scanning
 */
public void buildScanExpression(AttributeValue pHashAttrValue){
  DynamoDBScanExpression newScanExpression = new DynamoDBScanExpression();
  // TODO right now we only support scanning using the key, but we should support other types of scans
  newScanExpression.addFilterCondition(getKeySchema().getHashKeyElement().getAttributeName(), buildKeyScanCondition());
  dynamoDBExpression = newScanExpression;
}
项目:gora-boot    文件:DynamoDBStore.java   
/**
 * Executes a query after building a DynamoDB specific query based on the received one
 */
@Override
public Result<K, T> execute(Query<K, T> query) {
  DynamoDBQuery<K, T> dynamoDBQuery = buildDynamoDBQuery(query);
  DynamoDBMapper mapper = new DynamoDBMapper(dynamoDBClient);
  List<T> objList = null;
  if (DynamoDBQuery.getType().equals(DynamoDBQuery.RANGE_QUERY))
    objList = mapper.query(persistentClass, (DynamoDBQueryExpression)dynamoDBQuery.getQueryExpression());
    if (DynamoDBQuery.getType().equals(DynamoDBQuery.SCAN_QUERY))
      objList = mapper.scan(persistentClass, (DynamoDBScanExpression)dynamoDBQuery.getQueryExpression());
      return new DynamoDBResult<K, T>(this, query, objList);  
}
项目:gora-oraclenosql    文件:DynamoDBQuery.java   
/**
 * Builds scan query expression using a hash attribute value where to start
 * @param pHashAttrValueHash attribute value where to start scanning
 */
public void buildScanExpression(AttributeValue pHashAttrValue){
  DynamoDBScanExpression newScanExpression = new DynamoDBScanExpression();
  // TODO right now we only support scanning using the key, but we should support other types of scans
  newScanExpression.addFilterCondition(getKeySchema().getHashKeyElement().getAttributeName(), buildKeyScanCondition());
  dynamoDBExpression = newScanExpression;
}
项目:gora-oraclenosql    文件:DynamoDBStore.java   
/**
 * Executes a query after building a DynamoDB specific query based on the received one
 */
@Override
public Result<K, T> execute(Query<K, T> query) {
  DynamoDBQuery<K, T> dynamoDBQuery = buildDynamoDBQuery(query);
  DynamoDBMapper mapper = new DynamoDBMapper(dynamoDBClient);
  List<T> objList = null;
  if (DynamoDBQuery.getType().equals(DynamoDBQuery.RANGE_QUERY))
    objList = mapper.query(persistentClass, (DynamoDBQueryExpression)dynamoDBQuery.getQueryExpression());
    if (DynamoDBQuery.getType().equals(DynamoDBQuery.SCAN_QUERY))
      objList = mapper.scan(persistentClass, (DynamoDBScanExpression)dynamoDBQuery.getQueryExpression());
      return new DynamoDBResult<K, T>(this, query, objList);  
}