Beispiel #1
0
 @At
 @Ok("json")
 @AdaptBy(type = JsonAdaptor.class)
 public Object save(
     @Param("..") Store store, @Attr(scope = Scope.SESSION, value = "account") Account acc) {
   if (store.getId() == 0) {
     store.setAccountid(acc.accountid);
     store.setManagerid(acc.managerid);
     store = dao.insert(store);
   }
   return store;
 }
Beispiel #2
0
 @At
 @Ok("json")
 @AdaptBy(type = JsonAdaptor.class)
 public Object del(
     @Param("..") Store store, @Attr(scope = Scope.SESSION, value = "account") Account acc) {
   dao.delete(dao.fetch(Store.class, store.getId()));
   return store;
 }