public BC4JReferenceBlobTransferObject getRefBlobsForAdminComponent(Object refDocIdseq) throws Exception { try { ReferenceBlobsViewImpl rbVO = getReferenceBlobsView(); rbVO.setWhereClause("RD_IDSEQ = '" + refDocIdseq + "'"); rbVO.executeQuery(); ReferenceBlobsViewRowImpl rbViewRowImpl; rbViewRowImpl = (ReferenceBlobsViewRowImpl) rbVO.first(); return new BC4JReferenceBlobTransferObject(rbViewRowImpl); } catch (Exception ex) { log.error("Exception caught", ex); throw ex; } finally { } }
/** Get the forst reference document and the forst attachment of that reference Document */ public BC4JReferenceBlobTransferObject getFirstRefBlobsForAdminComponent(Object acIdseq) throws DocumentNotFoundException, Exception { try { ReferenceDocumentsViewImpl rdVO = getReferenceDocumentsView(); String where = " AC_IDSEQ = '" + acIdseq + "'"; rdVO.setWhereClause(where); rdVO.setOrderByClause("DISPLAY_ORDER"); rdVO.executeQuery(); ReferenceDocumentsViewRowImpl rdViewRowImpl; rdViewRowImpl = (ReferenceDocumentsViewRowImpl) rdVO.first(); if (rdViewRowImpl == null) { throw new DocumentNotFoundException("Document not found"); } String rdIdseq = rdViewRowImpl.getRdIdseq(); ReferenceBlobsViewImpl rbVO = getReferenceBlobsView(); rbVO.setWhereClause("RD_IDSEQ = '" + rdIdseq + "'"); rbVO.setOrderByClause("DATE_CREATED desc "); rbVO.executeQuery(); ReferenceBlobsViewRowImpl rbViewRowImpl; rbViewRowImpl = (ReferenceBlobsViewRowImpl) rbVO.first(); if (rbViewRowImpl == null) { throw new DocumentNotFoundException("Document not found"); } return new BC4JReferenceBlobTransferObject(rbViewRowImpl); } catch (DocumentNotFoundException ex) { log.error("Exception caught", ex); throw ex; } catch (Exception ex) { log.error("Exception caught", ex); throw ex; } finally { } }