com.norbl.util.aws
Class SDBAccess

java.lang.Object
  extended by com.norbl.util.aws.SDBAccess

public class SDBAccess
extends java.lang.Object


Nested Class Summary
static class SDBAccess.NamedAttribute
           
 
Constructor Summary
SDBAccess(ParamsEc2 paramsEc2)
           
 
Method Summary
 void addAttribute(java.lang.String domain, java.lang.String itemName, java.lang.String attributeName, java.lang.String attributeVal)
           
 void addAttributes(java.lang.String domain, java.lang.String itemName, java.util.List<SDBAccess.NamedAttribute> nats)
          Overwrites existing attribute values.
 com.amazonaws.services.simpledb.model.SelectResult getAll(java.lang.String domain)
           
 java.lang.String getUVal(java.lang.String domain, java.lang.String keyAttributeName, java.lang.String keyAttributeVal, java.lang.String soughtAttributeName)
          Assumes that the keyVal is unique - yields at most one item.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SDBAccess

public SDBAccess(ParamsEc2 paramsEc2)
          throws MissingParamsException
Throws:
MissingParamsException
Method Detail

getAll

public com.amazonaws.services.simpledb.model.SelectResult getAll(java.lang.String domain)

getUVal

public java.lang.String getUVal(java.lang.String domain,
                                java.lang.String keyAttributeName,
                                java.lang.String keyAttributeVal,
                                java.lang.String soughtAttributeName)
                         throws SDBAccessException
Assumes that the keyVal is unique - yields at most one item. If an item with the key val exists, the sought attribute is assumed to have only one value. If multiple items or values are found, an exception is thrown. If the no item has the key, null is returned.

Parameters:
keyName -
keyVal -
attributeSought -
Returns:
Throws:
SDBAccessException

addAttributes

public void addAttributes(java.lang.String domain,
                          java.lang.String itemName,
                          java.util.List<SDBAccess.NamedAttribute> nats)
Overwrites existing attribute values.

Parameters:
domain -
itemName -
nats -

addAttribute

public void addAttribute(java.lang.String domain,
                         java.lang.String itemName,
                         java.lang.String attributeName,
                         java.lang.String attributeVal)