@Test public void testFindLabeledDocumentByID() { try { DocumentNominalLabelDTO result = documentNominalLabelResourceFacadeImp .findLabeledDocumentByID(documentNominalLabel.getIdDTO() .getDocumentId()); assertEquals(documentNominalLabel.getIdDTO().getDocumentId(), result.getDocumentDTO().getDocumentID()); } catch (PropertyNotSetException ex) { logger.error("PropertyNotSetException while finding labelled documents by id "+ex.getMessage()); fail("findLabeledDocumentByID failed"); } }
@Override public DocumentNominalLabelDTO findLabeledDocumentByID(Long id) throws PropertyNotSetException { List<DocumentNominalLabelDTO> dtoList = findByCriteria("id.documentId", id.longValue()); return (dtoList != null && !dtoList.isEmpty()) ? dtoList.get(0) : null; }
DocumentNominalLabelResourceFacadeImp extends CoreDBServiceFacadeImp<DocumentNominalLabel, Long> implements DocumentNominalLabelResourceFacade { @Override public DocumentNominalLabelDTO findLabeledDocumentByID(Long id) throws PropertyNotSetException { List<DocumentNominalLabelDTO> dtoList = findByCriteria("id.documentId", id.longValue()); return (dtoList != null && !dtoList.isEmpty()) ? dtoList.get(0) : null; } }
DocumentNominalLabelResourceFacadeImp extends CoreDBServiceFacadeImp<DocumentNominalLabel, Long> implements DocumentNominalLabelResourceFacade { @Override public DocumentNominalLabelDTO findLabeledDocumentByID(Long id) throws PropertyNotSetException { List<DocumentNominalLabelDTO> dtoList = findByCriteria("id.documentId", id.longValue()); return (dtoList != null && !dtoList.isEmpty()) ? dtoList.get(0) : null; } protected  DocumentNominalLabelResourceFacadeImp(); }
DocumentNominalLabelResourceFacadeImp extends CoreDBServiceFacadeImp<DocumentNominalLabel, Long> implements DocumentNominalLabelResourceFacade { @Override public DocumentNominalLabelDTO findLabeledDocumentByID(Long id) throws PropertyNotSetException { List<DocumentNominalLabelDTO> dtoList = findByCriteria("id.documentId", id.longValue()); return (dtoList != null && !dtoList.isEmpty()) ? dtoList.get(0) : null; } 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 DocumentNominalLabelDTO findLabeledDocumentByID(Long id) throws PropertyNotSetException { List<DocumentNominalLabelDTO> dtoList = findByCriteria("id.documentId", id.longValue()); return (dtoList != null && !dtoList.isEmpty()) ? dtoList.get(0) : null; } 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);  }