Sie zeigen eine alte Version dieser Seite an. Zeigen Sie die aktuelle Version an.
Unterschiede anzeigen
Seitenhistorie anzeigen
Version 1
Aktuelle »
Language: Deutsch · English
4.8.3 Uniqueness check
4.8.3 Uniqueness check – part of the MT940 Nuclet documentation (duplicate check for imported MT940 transactions).
HOW-TO INTEGRATORS UPDATED: JUL 2026 APPLIES TO NUCLOS 4.2026.X
Die Prüfung, ob ein eingehender Datensatz aus dem MT940-Import bereits in der Datenbank vorhanden ist, wird in der Methode doesBankTransactionAlreadyExist() der abstrakten Klasse org.nuclet.mt940.logic.AbstractMT940Logic realisiert. Standardmäßig werden bei diesem Abgleich die folgenden Attribute berücksichtigt:
- Booking date (entry date)
- Value date (value date)
- Amount (amount)
- Debit/credit mark (debit credit mark)
- Bank transaction (business transaction type code/bank transaction type)
- Multipurpose field (information to account owner)
If this rule is to be modified (e.g. so that the check is less strict), this is the place to start. If possible, the change should not be made directly in the class AbstractMT940Logic. The source code location provided for this in the concrete implementation MT940Logic is marked accordingly with an @replace! tag.
/**
* Checks, if a representation of the given bank transaction has already been stored to the database.
*
* Identifiying criteria could be a combination of:
*
* - entry date
* - value date
* - amount
* - debit credit mark
* - business transaction type code / bank transaction type
* - information to account owner
* - remittance information
*
* @param transaction a given bank transaction, representated by a <code>Mt940Transaction</code> object
*
* @return true, if a representation of the given bank transaction has already been stored to the database
*
* @throws BusinessException might be thrown in case of errors or other exceptions
*/
public boolean doesBankTransactionAlreadyExist(MT940Transaction transaction) throws BusinessException
{
Query<BankTransaction> qryGetExistingBankTransactions = QueryProvider.create(BankTransaction.class);
final DebitCreditMark debitCreditMark = debitCreditMarkFacade.getDebitCreditMark(transaction.getDebitCreditMark().getName());
BankTransactionType bankTransactionType = null;
if (transaction.getBusinessTransactionTypeCode() != null) {
bankTransactionType = bankTransactionTypeFacade.getBankTransactionType(transaction.getBusinessTransactionTypeCode());
qryGetExistingBankTransactions.where(BankTransaction.EntryDate.eq(transaction.getEntryDate()))
.and(BankTransaction.ValueDate.eq(transaction.getValueDate()))
.and(BankTransaction.Amount.eq(transaction.getAmount()))
.and(BankTransaction.DebitCreditMark.eq(debitCreditMark.getId()))
.and(BankTransaction.BankTransactionType.eq(bankTransactionType.getId()))
.and(BankTransaction.InformationToAccountOwner.eq(transaction.getInformationToAccountOwner()));
} else {
qryGetExistingBankTransactions.where(BankTransaction.EntryDate.eq(transaction.getEntryDate()))
.and(BankTransaction.ValueDate.eq(transaction.getValueDate()))
.and(BankTransaction.Amount.eq(transaction.getAmount()))
.and(BankTransaction.DebitCreditMark.eq(debitCreditMark.getId()))
.and(BankTransaction.InformationToAccountOwner.eq(transaction.getInformationToAccountOwner()));
}
final List<BankTransaction> lstBankTransactions = QueryProvider.execute(qryGetExistingBankTransactions);
return (lstBankTransactions != null && lstBankTransactions.size() > 0);
}
Related pages
4.8 MT940: Specific extensions
Back to 4.8 MT940: Specific extensions
Open →
Nuclet Wiki
Nuclet Wiki home
Open →