/** * Looks up all of the generating lines and stores essential information about them on documents * given by the matchingAdvanceDepositDocumentNumbers parameter and matching the given * organization reference id * * @param matchingAdvanceDepositDocumentNumbers the document numbers of matching advance deposit * documents in lookup form * @param organizationReferenceId the organization reference id the accounting line must match * @return a List of essential information about each of the matching accounting lines */ protected List<GeneratingLineHolder> getGeneratingLinesForDocuments( String matchingAdvanceDepositDocumentNumbers, String organizationReferenceId) { List<GeneratingLineHolder> holders = new ArrayList<GeneratingLineHolder>(); Map fields = new HashMap(); fields.put("documentNumber", matchingAdvanceDepositDocumentNumbers); fields.put("organizationReferenceId", organizationReferenceId); Collection als = getLookupService().findCollectionBySearchUnbounded(SourceAccountingLine.class, fields); for (Object alAsObject : als) { final SourceAccountingLine accountingLine = (SourceAccountingLine) alAsObject; holders.add( new GeneratingLineHolder( accountingLine.getDocumentNumber(), accountingLine.getSequenceNumber())); } return holders; }