/** * Scans through an Amazon DynamoDB table and returns the matching results * as an unmodifiable list of instantiated objects. * @param scanExpression The scan expression. * @return The scan results. * @see com.amazonaws.services.dynamodbv2.datamodeling.DynamoDBMapper#scan */ public PaginatedScanList<T> scan(DynamoDBScanExpression scanExpression) { return mapper.<T>scan(model.targetType(), scanExpression); }
/** * Evaluates the specified scan expression and returns the count of matching * items, without returning any of the actual item data. * @param scanExpression The scan expression. * @return The count. * @see com.amazonaws.services.dynamodbv2.datamodeling.DynamoDBMapper#count */ public int count(DynamoDBScanExpression scanExpression) { return mapper.count(model.targetType(), scanExpression); }
/** * Queries an Amazon DynamoDB table and returns the matching results as an * unmodifiable list of instantiated objects. * @param queryExpression The query expression. * @return The query results. * @see com.amazonaws.services.dynamodbv2.datamodeling.DynamoDBMapper#query */ public PaginatedQueryList<T> query(DynamoDBQueryExpression<T> queryExpression) { return mapper.<T>query(model.targetType(), queryExpression); }
/** * Scans through an Amazon DynamoDB table on logically partitioned segments * in parallel and returns the matching results in one unmodifiable list of * instantiated objects. * @param scanExpression The scan expression. * @param totalSegments The total segments. * @return The scan results. * @see com.amazonaws.services.dynamodbv2.datamodeling.DynamoDBMapper#parallelScan */ public PaginatedParallelScanList<T> parallelScan(DynamoDBScanExpression scanExpression, int totalSegments) { return mapper.<T>parallelScan(model.targetType(), scanExpression, totalSegments); }
/** * Loads an object with the hash key given. * @param hashKey The hash key value. * @return The object. * @see com.amazonaws.services.dynamodbv2.datamodeling.DynamoDBMapper#load */ public T load(H hashKey) { return mapper.<T>load(model.targetType(), hashKey); }
/** * Loads an object with the hash and range key. * @param hashKey The hash key value. * @param rangeKey The range key value. * @return The object. * @see com.amazonaws.services.dynamodbv2.datamodeling.DynamoDBMapper#load */ public T load(H hashKey, R rangeKey) { return mapper.<T>load(model.targetType(), hashKey, rangeKey); }
/** * Evaluates the specified query expression and returns the count of matching * items, without returning any of the actual item data * @param queryExpression The query expression. * @return The count. * @see com.amazonaws.services.dynamodbv2.datamodeling.DynamoDBMapper#count */ public int count(DynamoDBQueryExpression<T> queryExpression) { return mapper.<T>count(model.targetType(), queryExpression); }
/** * Queries an Amazon DynamoDB table and returns a single page of matching * results. * @param queryExpression The query expression. * @return The query results. * @see com.amazonaws.services.dynamodbv2.datamodeling.DynamoDBMapper#query */ public QueryResultPage<T> queryPage(DynamoDBQueryExpression<T> queryExpression) { return mapper.<T>queryPage(model.targetType(), queryExpression); }
/** * Scans through an Amazon DynamoDB table and returns a single page of * matching results. * @param scanExpression The scan expression. * @return The scan results. * @see com.amazonaws.services.dynamodbv2.datamodeling.DynamoDBMapper#scanPage */ public ScanResultPage<T> scanPage(DynamoDBScanExpression scanExpression) { return mapper.<T>scanPage(model.targetType(), scanExpression); }
/** * Retrieves multiple items from the table using their primary keys. * @param itemsToGet The items to get. * @return The list of objects. * @see com.amazonaws.services.dynamodbv2.datamodeling.DynamoDBMapper#batchLoad */ public List<T> batchLoad(Iterable<T> itemsToGet) { final Map<String,List<Object>> results = mapper.batchLoad(itemsToGet); if (results.isEmpty()) { return Collections.<T>emptyList(); } return (List<T>)results.get(mapper.getTableName(model.targetType(), config)); }
/** * Returns information about the table, including the current status of the * table, when it was created, the primary key schema, and any indexes on * the table. * @return The describe table results. * @see com.amazonaws.services.dynamodbv2.AmazonDynamoDB#describeTable */ public TableDescription describeTable() { return db.describeTable( mapper.getTableName(model.targetType(), config) ).getTable(); }
/** * Deletes the table. * @return The table decription. * @see com.amazonaws.services.dynamodbv2.AmazonDynamoDB#deleteTable * @see com.amazonaws.services.dynamodbv2.model.DeleteTableRequest */ public TableDescription deleteTable() { return db.deleteTable( mapper.generateDeleteTableRequest(model.targetType()) ).getTableDescription(); }
/** * Creates the table with the specified throughput; also populates the same * throughput for all global secondary indexes. * @param throughput The provisioned throughput. * @return The table decription. * @see com.amazonaws.services.dynamodbv2.AmazonDynamoDB#createTable * @see com.amazonaws.services.dynamodbv2.model.CreateTableRequest */ public TableDescription createTable(ProvisionedThroughput throughput) { final CreateTableRequest request = mapper.generateCreateTableRequest(model.targetType()); request.setProvisionedThroughput(throughput); if (request.getGlobalSecondaryIndexes() != null) { for (final GlobalSecondaryIndex gsi : request.getGlobalSecondaryIndexes()) { gsi.setProvisionedThroughput(throughput); } } return db.createTable(request).getTableDescription(); }
/** * Queries an Amazon DynamoDB table and returns the matching results as an * unmodifiable list of instantiated objects. * @param queryExpression The query expression. * @return The query results. * @see com.amazonaws.services.dynamodbv2.datamodeling.DynamoDBMapper#query */ public PaginatedQueryList<T> query(DynamoDBQueryExpression<T> queryExpression) { return mapper.<T>query(model.targetType(), queryExpression); }
/** * Scans through an Amazon DynamoDB table and returns the matching results * as an unmodifiable list of instantiated objects. * @param scanExpression The scan expression. * @return The scan results. * @see com.amazonaws.services.dynamodbv2.datamodeling.DynamoDBMapper#scan */ public PaginatedScanList<T> scan(DynamoDBScanExpression scanExpression) { return mapper.<T>scan(model.targetType(), scanExpression); }
/** * Scans through an Amazon DynamoDB table and returns a single page of * matching results. * @param scanExpression The scan expression. * @return The scan results. * @see com.amazonaws.services.dynamodbv2.datamodeling.DynamoDBMapper#scanPage */ public ScanResultPage<T> scanPage(DynamoDBScanExpression scanExpression) { return mapper.<T>scanPage(model.targetType(), scanExpression); }
/** * Loads an object with the hash and range key. * @param hashKey The hash key value. * @param rangeKey The range key value. * @return The object. * @see com.amazonaws.services.dynamodbv2.datamodeling.DynamoDBMapper#load */ public T load(H hashKey, R rangeKey) { return mapper.<T>load(model.targetType(), hashKey, rangeKey); }
/** * Queries an Amazon DynamoDB table and returns a single page of matching * results. * @param queryExpression The query expression. * @return The query results. * @see com.amazonaws.services.dynamodbv2.datamodeling.DynamoDBMapper#query */ public QueryResultPage<T> queryPage(DynamoDBQueryExpression<T> queryExpression) { return mapper.<T>queryPage(model.targetType(), queryExpression); }
/** * Scans through an Amazon DynamoDB table on logically partitioned segments * in parallel and returns the matching results in one unmodifiable list of * instantiated objects. * @param scanExpression The scan expression. * @param totalSegments The total segments. * @return The scan results. * @see com.amazonaws.services.dynamodbv2.datamodeling.DynamoDBMapper#parallelScan */ public PaginatedParallelScanList<T> parallelScan(DynamoDBScanExpression scanExpression, int totalSegments) { return mapper.<T>parallelScan(model.targetType(), scanExpression, totalSegments); }
/** * Returns information about the table, including the current status of the * table, when it was created, the primary key schema, and any indexes on * the table. * @return The describe table results. * @see com.amazonaws.services.dynamodbv2.AmazonDynamoDB#describeTable */ public TableDescription describeTable() { return db.describeTable( mapper.getTableName(model.targetType(), config) ).getTable(); }