Seitenhistorie
...
Diese Logik wird durch den Ausdruck boBankTransaction.getInformationToAccountOwner().indexOf(strReference) >= 0 (aus dem Code-Segment, s.u.) beschrieben.
...
| Codeblock | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||
/** * Matches the given bank transaction with a map of references: * * If the transaction's field "information to account owner" contains the reference, the related * BusinessObject will be memorised, i.e. a list of all matching entries will be returned. * * @note A more sophisticated, application specific, behaviour might be implemented in * dedicated subclasses * * @param boBankTransaction a BusinessObject of type <code>BankTransaction</code> * @param mpReferences a map of references to be matched * @return a list of all BusinessObject that relate to a matching reference * * @throws BusinessException might be thrown by implementing classes in case of errors or other exceptions */ protected List<BusinessObject>List<T> findMatchingReferences(final BankTransaction boBankTransaction, final Map<BusinessObjectMap<T, String> mpReferences) throws BusinessException { final ArrayList<BusinessObject>ArrayList<T> lstMatchingReferences = new ArrayList<BusinessObject>ArrayList<T>(); final Set<BusinessObject>Set<T> stReferencedBusinessObjects = mpReferences.keySet(); // Check, if a matching reference exists... for (final BusinessObjectT businessObject : stReferencedBusinessObjects) { final String strReference = mpReferences.get(businessObject); logTrace("checking \"" + strReference + "\"..."); if (strReference != null || strReference.trim().length() == 0) { if (boBankTransaction.getInformationToAccountOwner().indexOf(strReference) >= 0) { log("matching reference found: " + strReference); lstMatchingReferences.add(businessObject); } } else { logWarn(""); } } return lstMatchingReferences; } |
...
Überblick
Inhalte