globe with meridians Language: Deutsch · English

hammer and wrench 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

On this page

Machine-translated – under review

This page was machine-translated from German as a first draft and is currently under review. The authoritative source remains the German original (see the language switch above).

The check whether an incoming record from the MT940 import already exists in the database is performed in the method doesBankTransactionAlreadyExist() of the abstract class org.nuclet.mt940.logic.AbstractMT940Logic. By default, the following attributes are taken into account in this comparison:

  • 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.

It is recommended to make the changes in the concrete implementation MT940Logic or in your own class that inherits from the abstract class AbstractMT940Logic.


org.nuclet.mt940.AbstractMT940Logic
/**
     * 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

open book 4.8 MT940: Specific extensions


Back to 4.8 MT940: Specific extensions

Open →

open book Nuclet Wiki


Nuclet Wiki home

Open →

  • Keine Stichwörter