Example #1
0
 public String addOrgGroup(OrgGroup o) {
   if (isDataEditable(ResUnit.OrgGroup)) {
     String newID = getDataSource(ResUnit.OrgGroup).insert(o); // persist it
     if (!hasDefaultDataSource(ResUnit.OrgGroup)) o.setID(newID);
     putOrgGroup(o); // ...and add it to the data set
     return newID;
   } else return fail("External OrgGroup dataset is read-only");
 }