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

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

public class CASKS008DataRecord
extends AbstractCASDataRecord

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

See Also:
Serialized Form

Field Summary
protected  int allPeople
          KS00080001 = allPeople
protected  int peopleOfWorkingAgeWithLimitingLongTermIllness
          KS00080003 = peopleOfWorkingAgeWithLimitingLongTermIllness
protected  int peopleWhoProvideUnpaidCare1to19HoursAWeek
          KS00080007 = peopleWhoProvideUnpaidCare1to19HoursAWeek
protected  int peopleWhoProvideUnpaidCare20to49HoursAWeek
          KS00080008 = peopleWhoProvideUnpaidCare20to49HoursAWeek
protected  int peopleWhoProvideUnpaidCare50rMoreHoursAWeek
          KS00080009 = peopleWhoProvideUnpaidCare50rMoreHoursAWeek
protected  int peopleWhoseGeneralHealthWasFairlyGood
          KS00080005 = peopleWhoseGeneralHealthWasFairlyGood
protected  int peopleWhoseGeneralHealthWasGood
          KS00080004 = peopleWhoseGeneralHealthWasGood
protected  int peopleWhoseGeneralHealthWasNotGood
          KS00080006 = peopleWhoseGeneralHealthWasNotGood
protected  int peopleWithLimitingLongTermIllness
          KS00080002 = peopleWithLimitingLongTermIllness
 
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
CASKS008DataRecord()
          Creates a new CASKS008Record
CASKS008DataRecord(boolean initZero)
          Creates a new CASKS008Record
CASKS008DataRecord(CASKS008DataRecord aCASKS008DataRecord)
          Creates a new CASKS008Record cloned from aCASKS008DataRecord
CASKS008DataRecord(long RecordID, java.lang.String line)
          Creates a new CASKS008DataRecord
CASKS008DataRecord(java.io.RandomAccessFile aRandomAccessFile)
          Creates a new CASKS008Record
 
Method Summary
protected  void _Init()
          Initialises all fields.
 CASKS008DataRecord aggregate(CASKS008DataRecord aCASKS008DataRecord)
           
 CASKS008DataRecord aggregate(CASKS008DataRecord aCASKS008DataRecord, long newRecordID, char[] newZone_Code)
           
 int getAllPeople()
          Returns a copy of this.allPeople
 int getPeopleOfWorkingAgeWithLimitingLongTermIllness()
          Returns a copy of this.peopleOfWorkingAgeWithLimitingLongTermIllness
 int getPeopleWhoProvideUnpaidCare1to19HoursAWeek()
          Returns a copy of this.peopleWhoProvideUnpaidCare1to19HoursAWeek
 int getPeopleWhoProvideUnpaidCare20to49HoursAWeek()
          Returns a copy of this.peopleWhoProvideUnpaidCare20to49HoursAWeek
 int getPeopleWhoProvideUnpaidCare50rMoreHoursAWeek()
          Returns a copy of this.peopleWhoProvideUnpaidCare50rMoreHoursAWeek
 int getPeopleWhoseGeneralHealthWasFairlyGood()
          Returns a copy of this.peopleWhoseGeneralHealthWasFairlyGood
 int getPeopleWhoseGeneralHealthWasGood()
          Returns a copy of this.peopleWhoseGeneralHealthWasGood
 int getPeopleWhoseGeneralHealthWasNotGood()
          Returns a copy of this.peopleWhoseGeneralHealthWasNotGood
 int getPeopleWithLimitingLongTermIllness()
          Returns a copy of this.peopleWithLimitingLongTermIllness
 long getSizeInBytes()
          Returns the size of this CASKS008Record in bytes as a long.
protected  void init(CASKS008DataRecord aCASKS008DataRecord)
          Initialises all fields from those in aCASKS008DataRecord.
protected  void initZero()
          Initialises all fields 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

allPeople

protected int allPeople
KS00080001 = allPeople


peopleWithLimitingLongTermIllness

protected int peopleWithLimitingLongTermIllness
KS00080002 = peopleWithLimitingLongTermIllness


peopleOfWorkingAgeWithLimitingLongTermIllness

protected int peopleOfWorkingAgeWithLimitingLongTermIllness
KS00080003 = peopleOfWorkingAgeWithLimitingLongTermIllness


peopleWhoseGeneralHealthWasGood

protected int peopleWhoseGeneralHealthWasGood
KS00080004 = peopleWhoseGeneralHealthWasGood


peopleWhoseGeneralHealthWasFairlyGood

protected int peopleWhoseGeneralHealthWasFairlyGood
KS00080005 = peopleWhoseGeneralHealthWasFairlyGood


peopleWhoseGeneralHealthWasNotGood

protected int peopleWhoseGeneralHealthWasNotGood
KS00080006 = peopleWhoseGeneralHealthWasNotGood


peopleWhoProvideUnpaidCare1to19HoursAWeek

protected int peopleWhoProvideUnpaidCare1to19HoursAWeek
KS00080007 = peopleWhoProvideUnpaidCare1to19HoursAWeek


peopleWhoProvideUnpaidCare20to49HoursAWeek

protected int peopleWhoProvideUnpaidCare20to49HoursAWeek
KS00080008 = peopleWhoProvideUnpaidCare20to49HoursAWeek


peopleWhoProvideUnpaidCare50rMoreHoursAWeek

protected int peopleWhoProvideUnpaidCare50rMoreHoursAWeek
KS00080009 = peopleWhoProvideUnpaidCare50rMoreHoursAWeek

Constructor Detail

CASKS008DataRecord

public CASKS008DataRecord()
Creates a new CASKS008Record


CASKS008DataRecord

public CASKS008DataRecord(boolean initZero)
Creates a new CASKS008Record

Parameters:
initZero - To ensure initZero() is used instead of _Init()

CASKS008DataRecord

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

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

CASKS008DataRecord

public CASKS008DataRecord(CASKS008DataRecord aCASKS008DataRecord)
Creates a new CASKS008Record cloned from aCASKS008DataRecord

Parameters:
aCASKS008DataRecord - The CASKS008Record from which this is cloned.

CASKS008DataRecord

public CASKS008DataRecord(java.io.RandomAccessFile aRandomAccessFile)
                   throws java.io.IOException
Creates a new CASKS008Record

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

_Init

protected void _Init()
Initialises all fields.

Overrides:
_Init in class AbstractCASDataRecord

initZero

protected void initZero()
Initialises all fields to zero.


init

protected void init(CASKS008DataRecord aCASKS008DataRecord)
Initialises all fields from those in aCASKS008DataRecord.

Parameters:
aCASKS008DataRecord - The CASKS008Record 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

getAllPeople

public int getAllPeople()
Returns a copy of this.allPeople


getPeopleWithLimitingLongTermIllness

public int getPeopleWithLimitingLongTermIllness()
Returns a copy of this.peopleWithLimitingLongTermIllness


getPeopleOfWorkingAgeWithLimitingLongTermIllness

public int getPeopleOfWorkingAgeWithLimitingLongTermIllness()
Returns a copy of this.peopleOfWorkingAgeWithLimitingLongTermIllness


getPeopleWhoseGeneralHealthWasGood

public int getPeopleWhoseGeneralHealthWasGood()
Returns a copy of this.peopleWhoseGeneralHealthWasGood


getPeopleWhoseGeneralHealthWasFairlyGood

public int getPeopleWhoseGeneralHealthWasFairlyGood()
Returns a copy of this.peopleWhoseGeneralHealthWasFairlyGood


getPeopleWhoseGeneralHealthWasNotGood

public int getPeopleWhoseGeneralHealthWasNotGood()
Returns a copy of this.peopleWhoseGeneralHealthWasNotGood


getPeopleWhoProvideUnpaidCare1to19HoursAWeek

public int getPeopleWhoProvideUnpaidCare1to19HoursAWeek()
Returns a copy of this.peopleWhoProvideUnpaidCare1to19HoursAWeek


getPeopleWhoProvideUnpaidCare20to49HoursAWeek

public int getPeopleWhoProvideUnpaidCare20to49HoursAWeek()
Returns a copy of this.peopleWhoProvideUnpaidCare20to49HoursAWeek


getPeopleWhoProvideUnpaidCare50rMoreHoursAWeek

public int getPeopleWhoProvideUnpaidCare50rMoreHoursAWeek()
Returns a copy of this.peopleWhoProvideUnpaidCare50rMoreHoursAWeek


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 CASKS008DataRecord aggregate(CASKS008DataRecord aCASKS008DataRecord)
Parameters:
aCASKS008DataRecord - The CASKS008DataRecord to be aggregated with this.
Returns:
An aggregated CASKS008DataRecord where: RecordID = this.RecordID Zone_Code = this.Zone_Code For aggregating CASKS008DataRecords. 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 CASKS008DataRecord aggregate(CASKS008DataRecord aCASKS008DataRecord,
                                    long newRecordID,
                                    char[] newZone_Code)
Parameters:
aCASKS008DataRecord - The CASKS008DataRecord to be aggregated with this.
newRecordID - The RecordID assigned to result.
newZone_Code - The Zone_Code assigned to result.
Returns:
An aggregated CASKS008DataRecord where: RecordID = newRecordID Zone_Code = newZone_Code For aggregating CASKS008DataRecords. 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 CASKS008Record 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.