List of usage examples for com.amazonaws.services.dynamodbv2.document Item getStringSet
public Set<String> getStringSet(String attrName)
From source file:com.exorath.service.party.service.DynamoDatabaseProvider.java
License:Apache License
/** * Convert an item containing information about a party into a party object * * @param item The item containing the information * @return A party object containing all possible information from the item *//*w ww.j a v a 2 s . c o m*/ private Party getPartyFromItem(Item item) { String owner_uuid = item.hasAttribute(OWNER_UUID) ? item.getString(OWNER_UUID) : null; String party_uuid = item.hasAttribute(PARTY_UUID) ? item.getString(PARTY_UUID) : null; String serverId = item.hasAttribute(SERVER_ID) ? item.getString(SERVER_ID) : null; ArrayList<String> members = item.hasAttribute(MEMBERS) ? new ArrayList<>(item.getStringSet(MEMBERS)) : null; Long expiry = item.hasAttribute(EXPIRE) ? item.getLong(EXPIRE) : null; return new Party(party_uuid, owner_uuid, serverId, members, expiry); }