获取typica库1.7中simpledb域的所有项

时间:2013-02-01 14:46:07

标签: java amazon-simpledb

在typica 1.7中,Domain类中没有listItemsWithAttributes函数,而在早期版本中可用。如何使用Typica 1.7获取域中的项目列表

1 个答案:

答案 0 :(得分:0)

请参阅com.xerox.amazonws.simpledb.Domain类的 selectItems 方法。您需要使用明确的属性列表传递查询。

您可以在SELECT查询 -

中指定显式属性列表(attribute1,...,attributeN)
select attribute1,..., attributeN from <domain name>

方法 -

public SDBListResult<Item> selectItems(String selectExpression,
                                   String nextToken,
                                   boolean consistent)
                            throws SDBException

Performs a query against this domain. A set of items is returned which may not be complete. If the nextToken in the result is set, this method can be called again with the same query and the supplied nextToken.

Parameters:
    selectExpression - the query to be run
    nextToken - an optional token to get more results
    consistent - if true, consistency is assured 
Throws:
    SDBException - wraps checked exceptions