コード例 #1
0
 @Override
 public boolean updateSubs(SubscriptionSupplier s) {
   // TODO Auto-generated method stub
   try {
     SubscriptionSupplier ss = em.find(SubscriptionSupplier.class, s.getId());
     ss.setStatus("validated");
     em.merge(ss);
   } catch (Exception e) {
     return false;
   }
   return true;
 }
コード例 #2
0
 @Override
 public boolean DeleteSubs(SubscriptionSupplier s) {
   try {
     em.remove(em.find(SubscriptionSupplier.class, s.getId()));
   } catch (Exception e) {
     return false;
   }
   return true;
 }