Class MBankStatementLoader

  • All Implemented Interfaces:
    Serializable, Cloneable, Comparator<Object>, I_C_BankStatementLoader, I_Persistent, Evaluatee

    public class MBankStatementLoader
    extends X_C_BankStatementLoader
    Bank Statement Loader Model This class is responsible for creating an instance of the bank statement loader class to use. It also inserts the data into the I_BankStatement table. The loader objects can access their configuration (e.g. file, URL, password etc) using the corresponding get methods provided by this class. As this class is derived from PO, "Persistent Object" it has access to the loader configuration that has been entered for this loader. How these values are interpreted is the responsibility of the loader. There are two file names provided, getFileName() and getLocalFileName(). The first one is the file name as entered on the loader configuration tab, the second one is the file name parameter from the loader process. Recommended behavior for a file based loader would be to use the file name from the process parameter if available, and resort to the file name from the loader configuration as a second option. For a HTTP based loader the file name from the loader configuration should be used to construct the URL to connect to (combined with the other parameters). In this scenario the file name from the process parameter can be used to save the acquired statement data to disk. author Maarten Klinker, Eldir Tomassen
    Version:
    $Id: MBankStatementLoader.java,v 1.3 2006/07/30 00:51:04 jjanke Exp $
    See Also:
    Serialized Form
    • Constructor Detail

      • MBankStatementLoader

        public MBankStatementLoader​(Properties ctx,
                                    int C_BankStatementLoader_ID,
                                    String trxName)
        Create a Statement Loader Added for compatibility with new PO infrastructure (bug# 968136)
        Parameters:
        ctx - Current context
        C_BankStatementLoader_ID - loader to use
        trxName - transaction
      • MBankStatementLoader

        public MBankStatementLoader​(Properties ctx,
                                    int C_BankStatementLoader_ID,
                                    String fileName,
                                    String trxName)
        Create a Statement Loader
        Parameters:
        ctx - Current context
        C_BankStatementLoader_ID - loader to use
        fileName - input file
        trxName - transaction
      • MBankStatementLoader

        public MBankStatementLoader​(Properties ctx,
                                    ResultSet rs,
                                    String trxName)
        Create a Statement Loader
        Parameters:
        ctx - Current context
        rs - ResultSet
        trxName - transaction
    • Method Detail

      • getLocalFileName

        public String getLocalFileName()
        Return Local File Name
        Returns:
        Name
      • loadLines

        public boolean loadLines()
        Start loading Bankstatements
        Returns:
        true if loading completed successfully
      • saveLine

        public boolean saveLine()
        Load a bank statement into the I_BankStatement table
        Returns:
        Statement line was loaded successfully This method is called by the BankStatementLoadere whenever a complete statement line has been read.
      • getErrorMessage

        public String getErrorMessage()
        Return the most recent error
        Returns:
        Error message This error message will be handled as a Adempiere message, (e.g. it can be translated)
      • getErrorDescription

        public String getErrorDescription()
        Return the most recent error description
        Returns:
        Error description This is an additional error description, it can be used to provided descriptive information, such as a file name or SQL error, that can not be translated by the Adempiere message system.
      • getLoadCount

        public int getLoadCount()
        The total number of statement lines loaded
        Returns:
        Number of imported statement lines