Exemplo 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());
   }
 }
Exemplo n.º 2
0
 public IPresidi create(
     long lCOD_CAG_PSD_ACD, String strIDE_PSD_ACD, long lCOD_LUO_FSC, String strSTA_PSD_ACD)
     throws javax.ejb.CreateException {
   PresidiBean bean = new PresidiBean();
   try {
     Object primaryKey =
         bean.ejbCreate(lCOD_CAG_PSD_ACD, strIDE_PSD_ACD, lCOD_LUO_FSC, strSTA_PSD_ACD);
     bean.setEntityContext(new EntityContextWrapper(primaryKey));
     bean.ejbPostCreate(lCOD_CAG_PSD_ACD, strIDE_PSD_ACD, lCOD_LUO_FSC, strSTA_PSD_ACD);
     return bean;
   } catch (Exception ex) {
     throw new javax.ejb.CreateException(ex.getMessage());
   }
 }
Exemplo n.º 3
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);
   }
 }