Seitenhistorie
...
4.8.1 Zuordnungslogik
ddd
| 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> findMatchingReferences(final BankTransaction boBankTransaction,
final Map<BusinessObject, String> mpReferences)
throws
BusinessException
{
final ArrayList<BusinessObject> lstMatchingReferences = new ArrayList<BusinessObject>();
final Set<BusinessObject> stReferencedBusinessObjects = mpReferences.keySet();
// Check, if a matching reference exists...
for (final BusinessObject businessObject : stReferencedBusinessObjects) {
final String strReference = mpReferences.get(businessObject);
if (boBankTransaction.getInformationToAccountOwner().indexOf(strReference) > 0) {
log("matching reference found: " + strReference);
lstMatchingReferences.add(businessObject);
}
}
return lstMatchingReferences;
} |
4.8.2 Eindeutigkeitsprüfung
...
Überblick
Inhalte