@Override public Map<String, Object> getUserPreferences(String principalName) { DynamoDB dynamoDB = new DynamoDB(documentstoreClient.getClient()); Table table = dynamoDB.getTable(USER_PREFERENCES); Item item = table.getItem(PRINCIPAL_NAME_KEY, principalName); return item == null ? null : item.asMap(); }
@Override public Map<String, Object> findInstitutionPreferences() { DynamoDB dynamoDB = new DynamoDB(documentstoreClient.getClient()); Table table = dynamoDB.getTable(INSTITUTION_PREFERENCES); Item item = table.getItem(INSTITUTION_ID_KEY, "1232413535"); return item == null ? null : item.asMap(); }