Exemple #1
0
 public static void merge(List<Capacity> listToMerge) {
   for (Capacity cap : listToMerge) {
     Capacity c = Capacity.find("byWorkplaceAndUser", cap.workplace, cap.user).first();
     c.merge(cap);
     c.save();
   }
 }
Exemple #2
0
 public static void deleteAll(String userName) {
   List<Capacity> caps = Capacity.find("byUser", userName).fetch();
   for (Capacity capacity : caps) {
     capacity.delete();
   }
 }