uk.ac.leeds.ccg.andyt.projects.moses.io
Class ToyModelDataRecord

java.lang.Object
  extended by uk.ac.leeds.ccg.andyt.projects.moses.io.AbstractDataRecord
      extended by uk.ac.leeds.ccg.andyt.projects.moses.io.AbstractCASDataRecord
          extended by uk.ac.leeds.ccg.andyt.projects.moses.io.ToyModelDataRecord
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable
Direct Known Subclasses:
ToyModelDataRecord_2

public class ToyModelDataRecord
extends AbstractCASDataRecord

For representing ToyModelDataRecords and providing safe access to the data.

See Also:
Serialized Form

Field Summary
 int tHouseholdID
           
 long tHSARDataRecordID
           
 long tISARDataRecordID
           
 int tPersonID
           
 
Fields inherited from class uk.ac.leeds.ccg.andyt.projects.moses.io.AbstractCASDataRecord
Zone_Code
 
Fields inherited from class uk.ac.leeds.ccg.andyt.projects.moses.io.AbstractDataRecord
_RecordID
 
Constructor Summary
ToyModelDataRecord()
          Creates a new ToyModelDataRecord
ToyModelDataRecord(boolean initZero)
          Creates a new ToyModelDataRecord with fields initialised to zero for aggregating
ToyModelDataRecord(java.io.RandomAccessFile aRandomAccessFile)
          Creates a new ToyModelDataRecord as read from aRandomAccessFile
ToyModelDataRecord(ToyModelDataHandler tToyModelDataHandler, java.lang.String line)
          Creates a new ToyModelDataRecord_2 from the String line AREACODE,PERSONID, HOUSEHOLDID,HSARRECORDID,INDIVIDUALSARRECORDID,AGE,SEX,LLTI ,HEALTH,ETHNICITY,CAROWNERSHIP PersonID is a number for each tPerson inside a tHousehold or for those in communal establishments (grouped) HouseholdID is a sequencial number for each tHousehold HSARDataRecord.RECORDID is the HSARDataRecord RECORDID or -9 if not an HSARDataRecord ISARDataRecord.RECORDID is the ISARDataRecord RECORDID or -9 if not an ISARDataRecord TODO: Docs
ToyModelDataRecord(ToyModelDataRecord_2 _ToyModelDataRecord_2)
          Creates a new ToyModelDataRecord_2 cloned from _ToyModelDataRecord_2
ToyModelDataRecord(ToyModelDataRecord _ToyModelDataRecord_3)
          Creates a new ToyModelDataRecord_2 cloned from _ToyModelDataRecord_2
 
Method Summary
protected  void _Init()
          Initialises all fields.
 long getSizeInBytes()
          Returns the size of this record in bytes.
protected  void init(ToyModelDataRecord_2 aToyModelDataRecord2)
          Initialises all fields.
protected  void init(ToyModelDataRecord aToyModelDataRecord3)
          Initialises all fields.
protected  void initZero()
          Initialises all fields.
 java.lang.String toString()
          Returns a string description of this;
 void write(java.io.RandomAccessFile aRandomAccessFile)
          Writes this to aRandomAccessFile at the current position.
 void write(java.io.RandomAccessFile aRandomAccessFile, boolean avoidCallToSuper)
          Writes this to aRandomAccessFile at the current position.
 
Methods inherited from class uk.ac.leeds.ccg.andyt.projects.moses.io.AbstractCASDataRecord
equals, getZone_Code, hashCode, init, toCSVString, toCSVStringFields, write
 
Methods inherited from class uk.ac.leeds.ccg.andyt.projects.moses.io.AbstractDataRecord
_Init, compareTo, get_RecordID, getNumberOfBitsInByte
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.lang.Comparable
compareTo
 

Field Detail

tISARDataRecordID

public long tISARDataRecordID

tHSARDataRecordID

public long tHSARDataRecordID

tPersonID

public int tPersonID

tHouseholdID

public int tHouseholdID
Constructor Detail

ToyModelDataRecord

public ToyModelDataRecord()
Creates a new ToyModelDataRecord


ToyModelDataRecord

public ToyModelDataRecord(boolean initZero)
Creates a new ToyModelDataRecord with fields initialised to zero for aggregating


ToyModelDataRecord

public ToyModelDataRecord(ToyModelDataRecord_2 _ToyModelDataRecord_2)
Creates a new ToyModelDataRecord_2 cloned from _ToyModelDataRecord_2

Parameters:
_ToyModelDataRecord_2 - The ToyModelDataRecord_2 from which this is cloned.

ToyModelDataRecord

public ToyModelDataRecord(ToyModelDataRecord _ToyModelDataRecord_3)
Creates a new ToyModelDataRecord_2 cloned from _ToyModelDataRecord_2

Parameters:
_ToyModelDataRecord_3 - The ToyModelDataRecord_2 from which this is cloned.

ToyModelDataRecord

public ToyModelDataRecord(ToyModelDataHandler tToyModelDataHandler,
                          java.lang.String line)
Creates a new ToyModelDataRecord_2 from the String line AREACODE,PERSONID, HOUSEHOLDID,HSARRECORDID,INDIVIDUALSARRECORDID,AGE,SEX,LLTI ,HEALTH,ETHNICITY,CAROWNERSHIP PersonID is a number for each tPerson inside a tHousehold or for those in communal establishments (grouped) HouseholdID is a sequencial number for each tHousehold HSARDataRecord.RECORDID is the HSARDataRecord RECORDID or -9 if not an HSARDataRecord ISARDataRecord.RECORDID is the ISARDataRecord RECORDID or -9 if not an ISARDataRecord TODO: Docs


ToyModelDataRecord

public ToyModelDataRecord(java.io.RandomAccessFile aRandomAccessFile)
Creates a new ToyModelDataRecord as read from aRandomAccessFile

Method Detail

init

protected void init(ToyModelDataRecord aToyModelDataRecord3)
Initialises all fields.


init

protected void init(ToyModelDataRecord_2 aToyModelDataRecord2)
Initialises all fields.


_Init

protected void _Init()
Initialises all fields.

Overrides:
_Init in class AbstractCASDataRecord

initZero

protected void initZero()
Initialises all fields.


toString

public java.lang.String toString()
Returns a string description of this;

Overrides:
toString in class AbstractCASDataRecord
Returns:
A String description of this.

write

public void write(java.io.RandomAccessFile aRandomAccessFile)
Writes this to aRandomAccessFile at the current position.

Overrides:
write in class AbstractCASDataRecord
Parameters:
aRandomAccessFile - The RandomAccessFile this is written to.
See Also:
AbstractDataRecord.write(RandomAccessFile)

write

public void write(java.io.RandomAccessFile aRandomAccessFile,
                  boolean avoidCallToSuper)
Writes this to aRandomAccessFile at the current position.

Parameters:
aRandomAccessFile - The RandomAccessFile this is written to.
avoidCallToSuper - If true super.write() is not called

getSizeInBytes

public long getSizeInBytes()
Returns the size of this record in bytes.

Overrides:
getSizeInBytes in class AbstractCASDataRecord
Returns:
The size (in bytes) of this as a long. This does not account for the private Fields serialVersionUID.