org.apache.gora.dynamodb.store
Class DynamoDBMapping.DynamoDBMappingBuilder

java.lang.Object
  extended by org.apache.gora.dynamodb.store.DynamoDBMapping.DynamoDBMappingBuilder
Enclosing class:
DynamoDBMapping

public static class DynamoDBMapping.DynamoDBMappingBuilder
extends Object

A builder for creating the mapper. This will allow building a thread safe DynamoDBMapping using simple immutabilty.


Constructor Summary
DynamoDBMapping.DynamoDBMappingBuilder()
           
 
Method Summary
 void addAttribute(String tableName, String attributeName, String attrType, int itemNumber)
          Adds an attribute to an specific item
 DynamoDBMapping build()
          Constructs the DynamoDBMapping object
 String getTableName(String tableName)
          Gets the table name for which the table is being mapped
 void setHashKeySchema(String tableName, String keyName, String keyType)
          Sets the hash key schema for the specified table
 void setHashRangeKeySchema(String tableName, String rangeKeyName, String rangeKeyType)
          Sets the hash range key schema for the specified table
 void setProvisionedThroughput(String tableName, long readCapUnits, long writeCapUnits)
          Sets the provisioned throughput for the specified table
 void setTableName(String tabName)
          Sets table name
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DynamoDBMapping.DynamoDBMappingBuilder

public DynamoDBMapping.DynamoDBMappingBuilder()
Method Detail

setTableName

public void setTableName(String tabName)
Sets table name

Parameters:
tabName -

getTableName

public String getTableName(String tableName)
Gets the table name for which the table is being mapped

Parameters:
tableName -
Returns:

setProvisionedThroughput

public void setProvisionedThroughput(String tableName,
                                     long readCapUnits,
                                     long writeCapUnits)
Sets the provisioned throughput for the specified table

Parameters:
tableName -
readCapUnits -
writeCapUnits -

setHashRangeKeySchema

public void setHashRangeKeySchema(String tableName,
                                  String rangeKeyName,
                                  String rangeKeyType)
Sets the hash range key schema for the specified table

Parameters:
tableName -
rangeKeyName -
rangeKeyType -

setHashKeySchema

public void setHashKeySchema(String tableName,
                             String keyName,
                             String keyType)
Sets the hash key schema for the specified table

Parameters:
tableName -
keyName -
keyType -

addAttribute

public void addAttribute(String tableName,
                         String attributeName,
                         String attrType,
                         int itemNumber)
Adds an attribute to an specific item

Parameters:
tableName -
attributeName -
attrType -
itemNumber -

build

public DynamoDBMapping build()
Constructs the DynamoDBMapping object

Returns:
A newly constructed mapping.


Copyright © 2010-2013 The Apache Software Foundation. All Rights Reserved.