Esempio n. 1
0
  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;
  }
Esempio n. 2
0
 @Override
 public <V> V readValue(Thing<V> thing) {
   // will always be populated
   return thing.getValue();
 }