com.univocity.parsers.common.processor
Class MasterDetailRecord

java.lang.Object
  extended by 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.

Author:
uniVocity Software Pty Ltd - parsers@univocity.com
See Also:
MasterDetailProcessor, RowProcessor, AbstractParser

Constructor Summary
MasterDetailRecord()
           
 
Method Summary
 void clear()
          Empties the detail rows and sets the master row to null.
 MasterDetailRecord clone()
           
 List<Object[]> getDetailRows()
          Returns the detail rows which are associated with the master row
 Object[] getMasterRow()
          Returns the master row as identified by a MasterDetailProcessor
 void setDetailRows(List<Object[]> detailRows)
          Sets the detail rows associated with the master row
 void setMasterRow(Object[] masterRow)
          Sets the master row data.
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MasterDetailRecord

public MasterDetailRecord()
Method Detail

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


Copyright © 2017 uniVocity Software Pty Ltd. All rights reserved.