Class MasterDetailRecord

java.lang.Object
com.univocity.parsers.common.processor.MasterDetailRecord
All Implemented Interfaces:
Cloneable

public class MasterDetailRecord extends Object implements 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:
  • Field Details

    • masterRow

      private Object[] masterRow
    • detailRows

      private List<Object[]> detailRows
  • Constructor Details

    • MasterDetailRecord

      public MasterDetailRecord()
  • Method Details

    • getMasterRow

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

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

      public List<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(List<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.
    • clone

      public MasterDetailRecord clone()
      Overrides:
      clone in class Object