コード例 #1
0
 @Override
 public void deleteNominalLabel(Long labelID) {
   try {
     remoteNominalLabelEJB.deleteNominalLabelByID(labelID);
   } catch (PropertyNotSetException e) {
     // TODO Auto-generated catch block
     e.printStackTrace();
   }
 }
コード例 #2
0
 @Override
 public List<NominalLabelDTO> getAllNominalLabel() {
   try {
     return remoteNominalLabelEJB.getAllNominalLabels();
   } catch (PropertyNotSetException e) {
     // TODO Auto-generated catch block
     e.printStackTrace();
     return null;
   }
 }
コード例 #3
0
 @Override
 public NominalLabelDTO getNominalLabelByID(Long id) {
   try {
     return remoteNominalLabelEJB.getNominalLabelByID(id);
   } catch (PropertyNotSetException e) {
     // TODO Auto-generated catch block
     e.printStackTrace();
     return null;
   }
 }
コード例 #4
0
 @Override
 public NominalLabelDTO editNominalLabel(NominalLabelDTO label) {
   try {
     return remoteNominalLabelEJB.editNominalLabel(label);
   } catch (PropertyNotSetException e) {
     // TODO Auto-generated catch block
     e.printStackTrace();
     return null;
   }
 }
コード例 #5
0
  @After
  public void tearDown() {
    if (taskAnswer != null) {
      entityManager.getTransaction().begin();
      taskAnswerResourceFacadeImp.undoTaskAnswer(documentDTO.getDocumentID(), user.getUserID());
      entityManager.getTransaction().commit();
    }

    if (documentDTO != null) {
      entityManager.getTransaction().begin();
      documentResourceFacadeImp.deleteDocument(documentDTO);
      entityManager.getTransaction().commit();
    }
    if (crisis != null) {

      try {
        entityManager.getTransaction().begin();
        crisisResourceFacadeImp.deleteCrisis(crisis);
        entityManager.getTransaction().commit();
        CollectionDTO result = crisisResourceFacadeImp.getCrisisByCode(crisis.getCode());
        assertNull(result);
      } catch (PropertyNotSetException e) {
        logger.error("PropertyNotSetException while deleting crisis " + e.getMessage());
      }
    }
    try {
      if (user != null) {
        entityManager.getTransaction().begin();
        userResourceFacadeImp.deleteUser(user.getUserID());
        entityManager.getTransaction().commit();
        UsersDTO result = userResourceFacadeImp.getUserByName(user.getName());
        assertNull(result);
      }
    } catch (PropertyNotSetException ex) {
      logger.error("PropertyNotSetException while deleting user " + ex.getMessage());
    }
  }