private Thing<Group> wrapGroup(Group g) { Thing t = new Thing(); // Integer id = um.getProjectId(g.getGroupName()); // if ( id != null ) { // t.setId("projectId:"+id.toString()); // } t.setId(g.getGroupName()); t.setKey(g.getGroupName()); t.setValue(g); t.setValueIsPopulated(true); t.setThingType(tr.getType(Group.class)); t.setParents(Sets.newTreeSet(g.getMembers().values())); return t; }
@Override public <V> V readValue(Thing<V> thing) { // will always be populated return thing.getValue(); }