Interface LoadResultListener


  • public interface LoadResultListener
    Callback API for processing errors and statistics of upload operation
    • Method Detail

      • needSuccessRecords

        boolean needSuccessRecords()
        Returns:
        this result listener needs to listen to the provided records
      • recordProvided

        void recordProvided​(Operation op,
                            Object[] record)
        Parameters:
        op - Operation requested
        record - Data submitted for processing
      • addProcessedRecordCount

        void addProcessedRecordCount​(Operation op,
                                     int i)
        Parameters:
        op - Operation requested
        i - number of rows that had been processed
      • addOperationRecordCount

        void addOperationRecordCount​(Operation op,
                                     int i)
        Parameters:
        op - Operation requested
        i - number of rows that had been affected by a given operation
      • needErrors

        boolean needErrors()
        Returns:
        whether this result listener needs to listen to error records
      • addError

        void addError​(LoadingError error)
        Parameters:
        error - information about error that was encountered
      • throwOnError

        boolean throwOnError()
        Returns:
        Whether to throw an exception upon encountering error
      • addErrorCount

        void addErrorCount​(int number)
        Method to add to the error count for a listener
        Parameters:
        number - the number of errors
      • resetErrorCount

        void resetErrorCount()
        Method to reset the error count back to zero
      • getErrorCount

        int getErrorCount()
        method to get the total number of errors
        Returns:
        the number of errors
      • addErrorRecordCount

        void addErrorRecordCount​(int number)
        Method to add to the error record count for a listener
        Parameters:
        number - the number of error records
      • resetErrorRecordCount

        void resetErrorRecordCount()
        Method to reset the errorRecordCount back to zero
      • getErrorRecordCount

        int getErrorRecordCount()
        method to get the total number of error records
        Returns:
        the number of rows in errors
      • resetSubmittedRowCount

        void resetSubmittedRowCount()
        Resets submitted row count
      • addSubmittedRowCount

        void addSubmittedRowCount​(int number)
        Adds the number of submitted rows
        Parameters:
        number - the number of submitted row
      • getSubmittedRowCount

        int getSubmittedRowCount()
        Gets the number of submitted row
        Returns:
        the number of submitted row