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

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.CASKS020DataRecord
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable

public class CASKS020DataRecord
extends AbstractCASDataRecord

For representing CAS KS020 Records and providing safe access to the data.

See Also:
Serialized Form

Field Summary
protected  int allHouseholds
          KS0200001 = allHouseholds
protected  int householdsComprisingOneFamilyAndNoOthersAllPensioners
          KS0200004 = householdsComprisingOneFamilyAndNoOthersAllPensioners
protected  int householdsComprisingOneFamilyAndNoOthersCohabitingCoupleHouseholdsAllChildrenNonDependent
          KS0200010 =householdsComprisingOneFamilyAndNoOthersCohabitingCoupleHouseholdsAllChildrenNonDependent
protected  int householdsComprisingOneFamilyAndNoOthersCohabitingCoupleHouseholdsNoChildren
          KS0200020 = householdsComprisingOneFamilyAndNoOthersCohabitingCoupleHouseholdsNoChildren
protected  int householdsComprisingOneFamilyAndNoOthersCohabitingCoupleHouseholdsWithDependentChildren
          KS0200009 =householdsComprisingOneFamilyAndNoOthersCohabitingCoupleHouseholdsWithDependentChildren
protected  int householdsComprisingOneFamilyAndNoOthersLoneParentHouseholdsAllChildrenNonDependent
          KS0200012 =householdsComprisingOneFamilyAndNoOthersLoneParentHouseholdsAllChildrenNonDependent
protected  int householdsComprisingOneFamilyAndNoOthersLoneParentHouseholdsWithDependentChildren
          KS0200011 =householdsComprisingOneFamilyAndNoOthersLoneParentHouseholdsWithDependentChildren
protected  int householdsComprisingOneFamilyAndNoOthersMarriedCoupleHouseholdsAllChildrenNonDependent
          KS0200007 =householdsComprisingOneFamilyAndNoOthersMarriedCoupleHouseholdsAllChildrenNonDependent
protected  int householdsComprisingOneFamilyAndNoOthersMarriedCoupleHouseholdsNoChildren
          KS0200005 = householdsComprisingOneFamilyAndNoOthersMarriedCoupleHouseholdsNoChildren
protected  int householdsComprisingOneFamilyAndNoOthersMarriedCoupleHouseholdsWithDependentChildren
          KS0200006 =householdsComprisingOneFamilyAndNoOthersMarriedCoupleHouseholdsWithDependentChildren
protected  int householdsComprisingOnePensioner
          KS0200002 = householdsComprisingOnePensioner
protected  int householdsComprisingOnePersonOtherThanPensioner
          KS0200003 = householdsComprisingOnePersonOtherThanPensioner
protected  int householdsComprisingOtherThanOneFamilyAllPensioner
          KS0200015 = householdsComprisingOtherThanOneFamilyAllPensioner
protected  int householdsComprisingOtherThanOneFamilyAllStudent
          KS0200014 = householdsComprisingOtherThanOneFamilyAllStudent
protected  int householdsComprisingOtherThanOneFamilyOther
          KS0200016 = householdsComprisingOtherThanOneFamilyOther
protected  int householdsComprisingOtherThanOneFamilyWithDependentChildren
          KS0200013 = householdsComprisingOtherThanOneFamilyWithDependentChildren
 
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
CASKS020DataRecord()
          Creates a new CASKS020Record
CASKS020DataRecord(CASKS020DataRecord aCASKS020Record)
          Creates a new CASKS020Record cloned from aCASKS020Record
CASKS020DataRecord(long RecordID, java.lang.String line)
          Creates a new CASKS020DataRecord
CASKS020DataRecord(java.io.RandomAccessFile aRandomAccessFile)
          Creates a new CASKS020Record
 
Method Summary
protected  void _Init()
          Initialise.
 CASKS020DataRecord aggregate(CASKS020DataRecord aCASKS020DataRecord)
           
 CASKS020DataRecord aggregate(CASKS020DataRecord aCASKS020DataRecord, long newRecordID, char[] newZone_Code)
           
 int getAllHouseholds()
          Returns a copy of this.allHouseholds
 int getHouseholdsComprisingOneFamilyAndNoOthersAllPensioners()
          Returns a copy of this.householdsComprisingOneFamilyAndNoOthersAllPensioners
 int getHouseholdsComprisingOneFamilyAndNoOthersCohabitingCoupleHouseholdsAllChildrenNonDependent()
          Returns a copy of this.householdsComprisingOneFamilyAndNoOthersCohabitingCoupleHouseholdsAllChildrenNonDependent
 int getHouseholdsComprisingOneFamilyAndNoOthersCohabitingCoupleHouseholdsNoChildren()
          Returns a copy of this.
 int getHouseholdsComprisingOneFamilyAndNoOthersCohabitingCoupleHouseholdsWithDependentChildren()
          Returns a copy of this.householdsComprisingOneFamilyAndNoOthersCohabitingCoupleHouseholdsWithDependentChildren
 int getHouseholdsComprisingOneFamilyAndNoOthersLoneParentHouseholdsAllChildrenNonDependent()
          Returns a copy of this.householdsComprisingOneFamilyAndNoOthersLoneParentHouseholdsAllChildrenNonDependent
 int getHouseholdsComprisingOneFamilyAndNoOthersLoneParentHouseholdsWithDependentChildren()
          Returns a copy of this.householdsComprisingOneFamilyAndNoOthersLoneParentHouseholdsWithDependentChildren
 int getHouseholdsComprisingOneFamilyAndNoOthersMarriedCoupleHouseholdsAllChildrenNonDependent()
          Returns a copy of this.householdsComprisingOneFamilyAndNoOthersMarriedCoupleHouseholdsAllChildrenNonDependent
 int getHouseholdsComprisingOneFamilyAndNoOthersMarriedCoupleHouseholdsNoChildren()
          Returns a copy of this.
 int getHouseholdsComprisingOneFamilyAndNoOthersMarriedCoupleHouseholdsWithDependentChildren()
          Returns a copy of this.householdsComprisingOneFamilyAndNoOthersMarriedCoupleHouseholdsWithDependentChildren
 int getHouseholdsComprisingOnePensioner()
          Returns a copy of this.householdsComprisingOnePensioner
 int getHouseholdsComprisingOnePersonOtherThanPensioner()
          Returns a copy of this.householdsComprisingOnePersonOtherThanPensioner
 int getHouseholdsComprisingOtherThanOneFamilyAllPensioner()
          Returns a copy of this.householdsComprisingOtherThanOneFamilyAllPensioner
 int getHouseholdsComprisingOtherThanOneFamilyAllStudent()
          Returns a copy of this.householdsComprisingOtherThanOneFamilyAllStudent
 int getHouseholdsComprisingOtherThanOneFamilyOther()
          Returns a copy of this.householdsComprisingOtherThanOneFamilyOther
 int getHouseholdsComprisingOtherThanOneFamilyWithDependentChildren()
          Returns a copy of this.householdsComprisingOtherThanOneFamilyWithDependentChildren
 long getSizeInBytes()
          Returns the size of this Record in bytes as a long.
protected  void init(CASKS020DataRecord cASKS020Record)
          Initialises all fields from those in cASKS020Record.
protected  void initZero()
          Initialise to zero.
 java.lang.String toCSVString()
           
 java.lang.String toCSVStringFields()
           
 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, 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

allHouseholds

protected int allHouseholds
KS0200001 = allHouseholds


householdsComprisingOnePensioner

protected int householdsComprisingOnePensioner
KS0200002 = householdsComprisingOnePensioner


householdsComprisingOnePersonOtherThanPensioner

protected int householdsComprisingOnePersonOtherThanPensioner
KS0200003 = householdsComprisingOnePersonOtherThanPensioner


householdsComprisingOneFamilyAndNoOthersAllPensioners

protected int householdsComprisingOneFamilyAndNoOthersAllPensioners
KS0200004 = householdsComprisingOneFamilyAndNoOthersAllPensioners


householdsComprisingOneFamilyAndNoOthersMarriedCoupleHouseholdsNoChildren

protected int householdsComprisingOneFamilyAndNoOthersMarriedCoupleHouseholdsNoChildren
KS0200005 = householdsComprisingOneFamilyAndNoOthersMarriedCoupleHouseholdsNoChildren


householdsComprisingOneFamilyAndNoOthersMarriedCoupleHouseholdsWithDependentChildren

protected int householdsComprisingOneFamilyAndNoOthersMarriedCoupleHouseholdsWithDependentChildren
KS0200006 =householdsComprisingOneFamilyAndNoOthersMarriedCoupleHouseholdsWithDependentChildren


householdsComprisingOneFamilyAndNoOthersMarriedCoupleHouseholdsAllChildrenNonDependent

protected int householdsComprisingOneFamilyAndNoOthersMarriedCoupleHouseholdsAllChildrenNonDependent
KS0200007 =householdsComprisingOneFamilyAndNoOthersMarriedCoupleHouseholdsAllChildrenNonDependent


householdsComprisingOneFamilyAndNoOthersCohabitingCoupleHouseholdsNoChildren

protected int householdsComprisingOneFamilyAndNoOthersCohabitingCoupleHouseholdsNoChildren
KS0200020 = householdsComprisingOneFamilyAndNoOthersCohabitingCoupleHouseholdsNoChildren


householdsComprisingOneFamilyAndNoOthersCohabitingCoupleHouseholdsWithDependentChildren

protected int householdsComprisingOneFamilyAndNoOthersCohabitingCoupleHouseholdsWithDependentChildren
KS0200009 =householdsComprisingOneFamilyAndNoOthersCohabitingCoupleHouseholdsWithDependentChildren


householdsComprisingOneFamilyAndNoOthersCohabitingCoupleHouseholdsAllChildrenNonDependent

protected int householdsComprisingOneFamilyAndNoOthersCohabitingCoupleHouseholdsAllChildrenNonDependent
KS0200010 =householdsComprisingOneFamilyAndNoOthersCohabitingCoupleHouseholdsAllChildrenNonDependent


householdsComprisingOneFamilyAndNoOthersLoneParentHouseholdsWithDependentChildren

protected int householdsComprisingOneFamilyAndNoOthersLoneParentHouseholdsWithDependentChildren
KS0200011 =householdsComprisingOneFamilyAndNoOthersLoneParentHouseholdsWithDependentChildren


householdsComprisingOneFamilyAndNoOthersLoneParentHouseholdsAllChildrenNonDependent

protected int householdsComprisingOneFamilyAndNoOthersLoneParentHouseholdsAllChildrenNonDependent
KS0200012 =householdsComprisingOneFamilyAndNoOthersLoneParentHouseholdsAllChildrenNonDependent


householdsComprisingOtherThanOneFamilyWithDependentChildren

protected int householdsComprisingOtherThanOneFamilyWithDependentChildren
KS0200013 = householdsComprisingOtherThanOneFamilyWithDependentChildren


householdsComprisingOtherThanOneFamilyAllStudent

protected int householdsComprisingOtherThanOneFamilyAllStudent
KS0200014 = householdsComprisingOtherThanOneFamilyAllStudent


householdsComprisingOtherThanOneFamilyAllPensioner

protected int householdsComprisingOtherThanOneFamilyAllPensioner
KS0200015 = householdsComprisingOtherThanOneFamilyAllPensioner


householdsComprisingOtherThanOneFamilyOther

protected int householdsComprisingOtherThanOneFamilyOther
KS0200016 = householdsComprisingOtherThanOneFamilyOther

Constructor Detail

CASKS020DataRecord

public CASKS020DataRecord()
Creates a new CASKS020Record


CASKS020DataRecord

public CASKS020DataRecord(CASKS020DataRecord aCASKS020Record)
Creates a new CASKS020Record cloned from aCASKS020Record

Parameters:
aCASKS020Record - The CASKS020Record from which this is cloned.

CASKS020DataRecord

public CASKS020DataRecord(long RecordID,
                          java.lang.String line)
                   throws java.io.IOException
Creates a new CASKS020DataRecord

Parameters:
RecordID - The RecordID to be assigned to this
line - The Comma Seperated Value String
Throws:
java.io.IOException

CASKS020DataRecord

public CASKS020DataRecord(java.io.RandomAccessFile aRandomAccessFile)
                   throws java.io.IOException
Creates a new CASKS020Record

Parameters:
aRandomAccessFile -
Throws:
java.io.IOException
Method Detail

_Init

protected void _Init()
Initialise.

Overrides:
_Init in class AbstractCASDataRecord

initZero

protected void initZero()
Initialise to zero.


init

protected void init(CASKS020DataRecord cASKS020Record)
Initialises all fields from those in cASKS020Record.

Parameters:
cASKS020Record - The CASKS020Record thats fields are used to initialise this.

toString

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

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

toCSVString

public java.lang.String toCSVString()
Overrides:
toCSVString in class AbstractCASDataRecord
Returns:
A Comma Seperated Version (CSV) String of the values of the Fields of this.

toCSVStringFields

public java.lang.String toCSVStringFields()
Overrides:
toCSVStringFields in class AbstractCASDataRecord
Returns:
A Comma Seperated Version (CSV) String of the names of the Fields of this

getAllHouseholds

public int getAllHouseholds()
Returns a copy of this.allHouseholds


getHouseholdsComprisingOnePensioner

public int getHouseholdsComprisingOnePensioner()
Returns a copy of this.householdsComprisingOnePensioner


getHouseholdsComprisingOnePersonOtherThanPensioner

public int getHouseholdsComprisingOnePersonOtherThanPensioner()
Returns a copy of this.householdsComprisingOnePersonOtherThanPensioner


getHouseholdsComprisingOneFamilyAndNoOthersAllPensioners

public int getHouseholdsComprisingOneFamilyAndNoOthersAllPensioners()
Returns a copy of this.householdsComprisingOneFamilyAndNoOthersAllPensioners


getHouseholdsComprisingOneFamilyAndNoOthersMarriedCoupleHouseholdsNoChildren

public int getHouseholdsComprisingOneFamilyAndNoOthersMarriedCoupleHouseholdsNoChildren()
Returns a copy of this. householdsComprisingOneFamilyAndNoOthersMarriedCoupleHouseholdsNoChildren


getHouseholdsComprisingOneFamilyAndNoOthersMarriedCoupleHouseholdsWithDependentChildren

public int getHouseholdsComprisingOneFamilyAndNoOthersMarriedCoupleHouseholdsWithDependentChildren()
Returns a copy of this.householdsComprisingOneFamilyAndNoOthersMarriedCoupleHouseholdsWithDependentChildren


getHouseholdsComprisingOneFamilyAndNoOthersMarriedCoupleHouseholdsAllChildrenNonDependent

public int getHouseholdsComprisingOneFamilyAndNoOthersMarriedCoupleHouseholdsAllChildrenNonDependent()
Returns a copy of this.householdsComprisingOneFamilyAndNoOthersMarriedCoupleHouseholdsAllChildrenNonDependent


getHouseholdsComprisingOneFamilyAndNoOthersCohabitingCoupleHouseholdsNoChildren

public int getHouseholdsComprisingOneFamilyAndNoOthersCohabitingCoupleHouseholdsNoChildren()
Returns a copy of this. householdsComprisingOneFamilyAndNoOthersCohabitingCoupleHouseholdsNoChildren


getHouseholdsComprisingOneFamilyAndNoOthersCohabitingCoupleHouseholdsWithDependentChildren

public int getHouseholdsComprisingOneFamilyAndNoOthersCohabitingCoupleHouseholdsWithDependentChildren()
Returns a copy of this.householdsComprisingOneFamilyAndNoOthersCohabitingCoupleHouseholdsWithDependentChildren


getHouseholdsComprisingOneFamilyAndNoOthersCohabitingCoupleHouseholdsAllChildrenNonDependent

public int getHouseholdsComprisingOneFamilyAndNoOthersCohabitingCoupleHouseholdsAllChildrenNonDependent()
Returns a copy of this.householdsComprisingOneFamilyAndNoOthersCohabitingCoupleHouseholdsAllChildrenNonDependent


getHouseholdsComprisingOneFamilyAndNoOthersLoneParentHouseholdsWithDependentChildren

public int getHouseholdsComprisingOneFamilyAndNoOthersLoneParentHouseholdsWithDependentChildren()
Returns a copy of this.householdsComprisingOneFamilyAndNoOthersLoneParentHouseholdsWithDependentChildren


getHouseholdsComprisingOneFamilyAndNoOthersLoneParentHouseholdsAllChildrenNonDependent

public int getHouseholdsComprisingOneFamilyAndNoOthersLoneParentHouseholdsAllChildrenNonDependent()
Returns a copy of this.householdsComprisingOneFamilyAndNoOthersLoneParentHouseholdsAllChildrenNonDependent


getHouseholdsComprisingOtherThanOneFamilyWithDependentChildren

public int getHouseholdsComprisingOtherThanOneFamilyWithDependentChildren()
Returns a copy of this.householdsComprisingOtherThanOneFamilyWithDependentChildren


getHouseholdsComprisingOtherThanOneFamilyAllStudent

public int getHouseholdsComprisingOtherThanOneFamilyAllStudent()
Returns a copy of this.householdsComprisingOtherThanOneFamilyAllStudent


getHouseholdsComprisingOtherThanOneFamilyAllPensioner

public int getHouseholdsComprisingOtherThanOneFamilyAllPensioner()
Returns a copy of this.householdsComprisingOtherThanOneFamilyAllPensioner


getHouseholdsComprisingOtherThanOneFamilyOther

public int getHouseholdsComprisingOtherThanOneFamilyOther()
Returns a copy of this.householdsComprisingOtherThanOneFamilyOther


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

aggregate

public CASKS020DataRecord aggregate(CASKS020DataRecord aCASKS020DataRecord)
Parameters:
aCASKS020DataRecord - The CASKS020DataRecord to be aggregated with this.
Returns:
An aggregated CASKS020DataRecord where: RecordID = this.RecordID Zone_Code = this.Zone_Code For aggregating CASKS020DataRecords. User needs to take care in aggregating to ensure aggregation does not compromise (introduce error) based on the numbers used (i.e. numbers may not be precise or have sufficient magnitude).

aggregate

public CASKS020DataRecord aggregate(CASKS020DataRecord aCASKS020DataRecord,
                                    long newRecordID,
                                    char[] newZone_Code)
Parameters:
aCASKS020DataRecord - The CASKS020DataRecord to be aggregated with this.
newRecordID - The RecordID assigned to result.
newZone_Code - The Zone_Code assigned to result.
Returns:
An aggregated CASKS020DataRecord where: RecordID = newRecordID Zone_Code = newZone_Code For aggregating CASKS020DataRecords. User needs to take care in aggregating to ensure aggregation does not compromise (introduce error) based on the numbers used (i.e. numbers may not be precise or have sufficient magnitude).

getSizeInBytes

public long getSizeInBytes()
Returns the size of this Record in bytes as a long. This does not account for serialVersionUID. A boolean is assumed to be the same size as an int 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.