Class MasterDetailRecord
- java.lang.Object
-
- com.univocity.parsers.common.processor.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 ofAbstractParser
during the parsing of an input using aMasterDetailProcessor
.- 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
-
Constructor Summary
Constructors Constructor Description MasterDetailRecord()
-
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 rowjava.lang.Object[]
getMasterRow()
Returns the master row as identified by aMasterDetailProcessor
void
setDetailRows(java.util.List<java.lang.Object[]> detailRows)
Sets the detail rows associated with the master rowvoid
setMasterRow(java.lang.Object[] masterRow)
Sets the master row data.
-
-
-
Method Detail
-
getMasterRow
public java.lang.Object[] getMasterRow()
Returns the master row as identified by aMasterDetailProcessor
- 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.
-
clone
public MasterDetailRecord clone()
- Overrides:
clone
in classjava.lang.Object
-
-