Esempio n. 1
0
 public IPresidi findByPrimaryKey(Long primaryKey) throws javax.ejb.FinderException {
   PresidiBean bean = new PresidiBean();
   try {
     bean.setEntityContext(new EntityContextWrapper(primaryKey));
     bean.ejbActivate();
     bean.ejbLoad();
     return bean;
   } catch (Exception ex) {
     throw new javax.ejb.FinderException(ex.getMessage());
   }
 }
Esempio n. 2
0
 @Override
 public void remove(Object primaryKey) {
   PresidiBean bean = new PresidiBean();
   try {
     Object obj = bean.ejbFindByPrimaryKey((Long) primaryKey);
     bean.setEntityContext(new EntityContextWrapper(obj));
     bean.ejbActivate();
     bean.ejbLoad();
     bean.ejbRemove();
   } catch (Exception ex) {
     throw new EJBException(ex);
   }
 }