Class MasterDetailRecord

  • All Implemented Interfaces:
    java.lang.Cloneable

    public class MasterDetailRecord
    extends java.lang.Object
    implements java.lang.Cloneable
    An utility class to store data of a master row and its detail records. Instances of this class are typically generated by an instance of AbstractParser during the parsing of an input using a MasterDetailProcessor.
    See Also:
    MasterDetailProcessor, RowProcessor, AbstractParser
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private java.util.List<java.lang.Object[]> detailRows  
      private java.lang.Object[] masterRow  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void clear()
      Empties the detail rows and sets the master row to null.
      MasterDetailRecord clone()  
      java.util.List<java.lang.Object[]> getDetailRows()
      Returns the detail rows which are associated with the master row
      java.lang.Object[] getMasterRow()
      Returns the master row as identified by a MasterDetailProcessor
      void setDetailRows​(java.util.List<java.lang.Object[]> detailRows)
      Sets the detail rows associated with the master row
      void setMasterRow​(java.lang.Object[] masterRow)
      Sets the master row data.
      • Methods inherited from class java.lang.Object

        equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • masterRow

        private java.lang.Object[] masterRow
      • detailRows

        private java.util.List<java.lang.Object[]> detailRows
    • Constructor Detail

      • MasterDetailRecord

        public MasterDetailRecord()
    • Method Detail

      • getMasterRow

        public java.lang.Object[] getMasterRow()
        Returns the master row as identified by a MasterDetailProcessor
        Returns:
        the master row
      • setMasterRow

        public void setMasterRow​(java.lang.Object[] masterRow)
        Sets the master row data.
        Parameters:
        masterRow - the data of a master row
      • getDetailRows

        public java.util.List<java.lang.Object[]> getDetailRows()
        Returns the detail rows which are associated with the master row
        Returns:
        the detail rows which are associated with the master row
      • setDetailRows

        public void setDetailRows​(java.util.List<java.lang.Object[]> detailRows)
        Sets the detail rows associated with the master row
        Parameters:
        detailRows - the list of rows associated with the master row
      • clear

        public void clear()
        Empties the detail rows and sets the master row to null.