Class SimpleDBConnectionImpl
- java.lang.Object
-
- org.teiid.translator.simpledb.api.SimpleDBConnectionImpl
-
- All Implemented Interfaces:
Connection,SimpleDBConnection
public class SimpleDBConnectionImpl extends Object implements SimpleDBConnection
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.teiid.translator.simpledb.api.SimpleDBConnection
SimpleDBConnection.SimpleDBAttribute
-
-
Field Summary
-
Fields inherited from interface org.teiid.translator.simpledb.api.SimpleDBConnection
ITEM_NAME
-
-
Constructor Summary
Constructors Constructor Description SimpleDBConnectionImpl(com.amazonaws.services.simpledb.AmazonSimpleDB amazonSimpleDBClient)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()voidcreateDomain(String domainName)Create a domainvoiddeleteDomain(String domainName)Delete a DomainSet<SimpleDBConnection.SimpleDBAttribute>getAttributeNames(String domainName)Get the attributes for given domain nameList<String>getDomains()Lists all domains of databaseintperformDelete(String domainName, String selectExpression)Removes item with given ItemName from domainintperformInsert(String domainName, List<Column> columns, Iterator<? extends List<?>> valueList)Inserts item into given domain.com.amazonaws.services.simpledb.model.SelectResultperformSelect(String selectExpression, String nextToken)Performs select expression.intperformUpdate(String domainName, Map<String,Object> updateAttributes, String selectExpression)Performs update on given domain and items
-
-
-
Method Detail
-
createDomain
public void createDomain(String domainName) throws TranslatorException
Description copied from interface:SimpleDBConnectionCreate a domain- Specified by:
createDomainin interfaceSimpleDBConnection- Throws:
TranslatorException
-
deleteDomain
public void deleteDomain(String domainName) throws TranslatorException
Description copied from interface:SimpleDBConnectionDelete a Domain- Specified by:
deleteDomainin interfaceSimpleDBConnection- Throws:
TranslatorException
-
getDomains
public List<String> getDomains() throws TranslatorException
Description copied from interface:SimpleDBConnectionLists all domains of database- Specified by:
getDomainsin interfaceSimpleDBConnection- Returns:
- Throws:
TranslatorException
-
getAttributeNames
public Set<SimpleDBConnection.SimpleDBAttribute> getAttributeNames(String domainName) throws TranslatorException
Description copied from interface:SimpleDBConnectionGet the attributes for given domain name- Specified by:
getAttributeNamesin interfaceSimpleDBConnection- Returns:
- Set of attribute names for given domain
- Throws:
TranslatorException
-
performInsert
public int performInsert(String domainName, List<Column> columns, Iterator<? extends List<?>> valueList) throws TranslatorException
Description copied from interface:SimpleDBConnectionInserts item into given domain.- Specified by:
performInsertin interfaceSimpleDBConnection- Returns:
- Throws:
TranslatorException
-
performSelect
public com.amazonaws.services.simpledb.model.SelectResult performSelect(String selectExpression, String nextToken) throws TranslatorException
Description copied from interface:SimpleDBConnectionPerforms select expression. This expression must be in format which is understandable to SimpleDB database- Specified by:
performSelectin interfaceSimpleDBConnection- Throws:
TranslatorException
-
performUpdate
public int performUpdate(String domainName, Map<String,Object> updateAttributes, String selectExpression) throws TranslatorException
Description copied from interface:SimpleDBConnectionPerforms update on given domain and items- Specified by:
performUpdatein interfaceSimpleDBConnection- Throws:
TranslatorException
-
performDelete
public int performDelete(String domainName, String selectExpression) throws TranslatorException
Description copied from interface:SimpleDBConnectionRemoves item with given ItemName from domain- Specified by:
performDeletein interfaceSimpleDBConnection- Throws:
TranslatorException
-
close
public void close()
- Specified by:
closein interfaceConnection
-
-