@Test public void testDeleteDocument() throws Exception { Integer result = documentNominalLabelResourceFacadeImp .deleteDocument(documentNominalLabel); assertEquals(Integer.valueOf(1), result); documentNominalLabel = null; }
@Override public Integer deleteDocument(DocumentNominalLabelDTO doc) { try { DocumentNominalLabel managed = em.merge(doc.toEntity()); em.remove(managed); } catch (Exception e) { logger.warn("Warning! Couldn't delete document nominal label with id : " + doc.getIdDTO()); return 0; } return 1; }
DocumentNominalLabelResourceFacadeImp extends CoreDBServiceFacadeImp<DocumentNominalLabel, Long> implements DocumentNominalLabelResourceFacade { @Override public Integer deleteDocument(DocumentNominalLabelDTO doc) { try { DocumentNominalLabel managed = em.merge(doc.toEntity()); em.remove(managed); } catch (Exception e) { logger.warn("Warning! Couldn't delete document nominal label with id : " + doc.getIdDTO()); return 0; } return 1; } }
DocumentNominalLabelResourceFacadeImp extends CoreDBServiceFacadeImp<DocumentNominalLabel, Long> implements DocumentNominalLabelResourceFacade { @Override public Integer deleteDocument(DocumentNominalLabelDTO doc) { try { DocumentNominalLabel managed = em.merge(doc.toEntity()); em.remove(managed); } catch (Exception e) { logger.warn("Warning! Couldn't delete document nominal label with id : " + doc.getIdDTO()); return 0; } return 1; } protected  DocumentNominalLabelResourceFacadeImp(); }
DocumentNominalLabelResourceFacadeImp extends CoreDBServiceFacadeImp<DocumentNominalLabel, Long> implements DocumentNominalLabelResourceFacade { @Override public Integer deleteDocument(DocumentNominalLabelDTO doc) { try { DocumentNominalLabel managed = em.merge(doc.toEntity()); em.remove(managed); } catch (Exception e) { logger.warn("Warning! Couldn't delete document nominal label with id : " + doc.getIdDTO()); return 0; } return 1; } protected  DocumentNominalLabelResourceFacadeImp(); @Override void saveDocumentNominalLabel(DocumentNominalLabelDTO documentNominalLabel); @Override boolean foundDuplicate(DocumentNominalLabelDTO documentNominalLabel); @Override DocumentNominalLabelDTO addDocument(DocumentNominalLabelDTO doc); @Override DocumentNominalLabelDTO editDocument(DocumentNominalLabelDTO doc); @Override Integer deleteDocument(DocumentNominalLabelDTO doc); @Override List<DocumentNominalLabelDTO> findByCriteria(String columnName, Object value); @Override DocumentNominalLabelDTO findDocumentByPrimaryKey(DocumentNominalLabelIdDTO id); @Override boolean isDocumentExists(DocumentNominalLabelIdDTO id); @Override boolean isDocumentExists(Long id); @Override List<DocumentNominalLabelDTO> getAllDocuments(); @Override DocumentNominalLabelDTO findLabeledDocumentByID(Long id); @Override List<DocumentNominalLabelDTO> findLabeledDocumentListByID(Long id); @Override List<DocumentNominalLabelDTO> getLabeledDocumentCollectionForNominalLabel(Integer nominalLabelID); @Override void deleteDocumentNominalLabelByNominalLabel(Long nominalLabelID); }
DocumentNominalLabelResourceFacadeImp extends CoreDBServiceFacadeImp<DocumentNominalLabel, Long> implements DocumentNominalLabelResourceFacade { @Override public Integer deleteDocument(DocumentNominalLabelDTO doc) { try { DocumentNominalLabel managed = em.merge(doc.toEntity()); em.remove(managed); } catch (Exception e) { logger.warn("Warning! Couldn't delete document nominal label with id : " + doc.getIdDTO()); return 0; } return 1; } protected  DocumentNominalLabelResourceFacadeImp(); @Override void saveDocumentNominalLabel(DocumentNominalLabelDTO documentNominalLabel); @Override boolean foundDuplicate(DocumentNominalLabelDTO documentNominalLabel); @Override DocumentNominalLabelDTO addDocument(DocumentNominalLabelDTO doc); @Override DocumentNominalLabelDTO editDocument(DocumentNominalLabelDTO doc); @Override Integer deleteDocument(DocumentNominalLabelDTO doc); @Override List<DocumentNominalLabelDTO> findByCriteria(String columnName, Object value); @Override DocumentNominalLabelDTO findDocumentByPrimaryKey(DocumentNominalLabelIdDTO id); @Override boolean isDocumentExists(DocumentNominalLabelIdDTO id); @Override boolean isDocumentExists(Long id); @Override List<DocumentNominalLabelDTO> getAllDocuments(); @Override DocumentNominalLabelDTO findLabeledDocumentByID(Long id); @Override List<DocumentNominalLabelDTO> findLabeledDocumentListByID(Long id); @Override List<DocumentNominalLabelDTO> getLabeledDocumentCollectionForNominalLabel(Integer nominalLabelID); @Override void deleteDocumentNominalLabelByNominalLabel(Long nominalLabelID);  }