com.biocomfort.TO
Class SerialNumberTO

java.lang.Object
  extended by com.biocomfort.TO.SerialNumberTO
All Implemented Interfaces:
TO, java.io.Serializable, java.lang.Cloneable

public class SerialNumberTO
extends java.lang.Object
implements TO, java.io.Serializable, java.lang.Cloneable

The SerialNumberTO is a data class to store the serial number information of a medical device. It is part of the class MedicalDeviceTO but initially not instantiated. To store the serial number for a medical device create a new instance of this class and assign it to the MedicalDeviceTO object.

See Also:
MedicalDeviceTO.setSerialNumber(SerialNumberTO), MedicalDeviceTO.getSerialNumber(), Serialized Form

Constructor Summary
SerialNumberTO()
          Constructs a SerialNumberTO object with initializing it so that the device type is 0, the serial number is '00 00', the item number is '00 00 00', the production week is 0 and the production year is 2000.
 
Method Summary
 java.lang.Object clone()
          Returns a deep clone of this SerialNumberTO object.
 java.lang.String formatSerialNumber()
          Converts this SerialNumberTO object to a String of the form: iiiiii dd yyww ssss.
 int getDeviceType()
          Returns the device type of the medical device to whose MedicalDeviceTO object this serial number data object is assign to.
 short[] getItemNumber()
          Returns a short array of length 3 representing the item number of the medical device to whose MedicalDeviceTO object this serial number data object is assign to.
 int getProductionWeek()
          Returns the production week of the medical device to whose MedicalDeviceTO object this serial number data object is assign to.
 int getProductionYear()
          Returns the production year of the medical device to whose MedicalDeviceTO object this serial number data object is assign to.
 short[] getSerialNumber()
          Returns a short array of length 2 representing the serial number of the medical device to whose MedicalDeviceTO object this serial number data object is assign to.
 void setDeviceType(int value)
          Sets the device type of the medical device to whose MedicalDeviceTO object this serial number data object is assign to.
 void setItemNumber(short[] value)
          Sets the item number specified by the given short array.
 void setProductionWeek(int value)
          Sets the production week of the medical device to whose MedicalDeviceTO object this serial number data object is assign to.
 void setProductionYear(int value)
          Sets the production year of the medical device to whose MedicalDeviceTO object this serial number data object is assign to.
 void setSerialNumber(short[] value)
          Sets the serial number specified by the given short array.
 void setSerialNumberInformation(short[] itemNumber, int deviceType, int productionWeek, int productionYear, short[] serialNumber)
          Sets the serial number information specified by the given itemNumber, deviceType, productionWeek, productionYear and serialNumber arguments.
 java.lang.String toString()
          Converts this SerialNumberTO object to a String of the form: SerialNumberTO (serialNumber:ss ss,productionWeek:w,productionYear:y,deviceType:d,itemNumber:ii ii ii).
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SerialNumberTO

public SerialNumberTO()
Constructs a SerialNumberTO object with initializing it so that the device type is 0, the serial number is '00 00', the item number is '00 00 00', the production week is 0 and the production year is 2000.

Method Detail

setSerialNumberInformation

public void setSerialNumberInformation(short[] itemNumber,
                                       int deviceType,
                                       int productionWeek,
                                       int productionYear,
                                       short[] serialNumber)
Sets the serial number information specified by the given itemNumber, deviceType, productionWeek, productionYear and serialNumber arguments. The short array itemNumber must have a length of 3, the argument serialNumber a length of 2.

If a FirmwareTO data object is assigned to the MedicalDeviceTO object the method FirmwareTO.getDeviceType() should return the same device type.

Parameters:
itemNumber - short array of length 3 representing the new item number
deviceType - the new medical device's type
productionWeek - the new medical device's production week
productionYear - the new medical device's production year
serialNumber - short array of length 2 representing the new serial number
See Also:
FirmwareTO.getDeviceType(), SDK.DEVICE_TYPE_BLOOD_PRESSURE, SDK.DEVICE_TYPE_BLOOD_GLUCOSE, SDK.DEVICE_TYPE_SCALE

getSerialNumber

public short[] getSerialNumber()
Returns a short array of length 2 representing the serial number of the medical device to whose MedicalDeviceTO object this serial number data object is assign to.

Returns:
short array of length 2 representing the serial number

setSerialNumber

public void setSerialNumber(short[] value)
Sets the serial number specified by the given short array. The short array must have a length of 2.

Parameters:
value - short array of length 2 representing the new serial number

getProductionWeek

public int getProductionWeek()
Returns the production week of the medical device to whose MedicalDeviceTO object this serial number data object is assign to.

Returns:
the production week

setProductionWeek

public void setProductionWeek(int value)
Sets the production week of the medical device to whose MedicalDeviceTO object this serial number data object is assign to.

Parameters:
value - the new production week

getProductionYear

public int getProductionYear()
Returns the production year of the medical device to whose MedicalDeviceTO object this serial number data object is assign to.

Returns:
the production year

setProductionYear

public void setProductionYear(int value)
Sets the production year of the medical device to whose MedicalDeviceTO object this serial number data object is assign to.

Parameters:
value - the new production year

getDeviceType

public int getDeviceType()
Returns the device type of the medical device to whose MedicalDeviceTO object this serial number data object is assign to.

If a FirmwareTO data object is assigned to the MedicalDeviceTO object the method FirmwareTO.getDeviceType() should return the same device type.

Returns:
the medical device's type
See Also:
FirmwareTO.getDeviceType(), SDK.DEVICE_TYPE_BLOOD_PRESSURE, SDK.DEVICE_TYPE_BLOOD_GLUCOSE, SDK.DEVICE_TYPE_SCALE

setDeviceType

public void setDeviceType(int value)
Sets the device type of the medical device to whose MedicalDeviceTO object this serial number data object is assign to.

If a FirmwareTO data object is assigned to the MedicalDeviceTO object the method FirmwareTO.getDeviceType() should return the same device type.

Parameters:
value - the new medical device's type
See Also:
FirmwareTO.getDeviceType(), SDK.DEVICE_TYPE_BLOOD_PRESSURE, SDK.DEVICE_TYPE_BLOOD_GLUCOSE, SDK.DEVICE_TYPE_SCALE

getItemNumber

public short[] getItemNumber()
Returns a short array of length 3 representing the item number of the medical device to whose MedicalDeviceTO object this serial number data object is assign to.

Returns:
short array of length 3 representing the item number

setItemNumber

public void setItemNumber(short[] value)
Sets the item number specified by the given short array. The short array must have a length of 3.

Parameters:
value - short array of length 3 representing the new item number

toString

public java.lang.String toString()
Converts this SerialNumberTO object to a String of the form:
 SerialNumberTO (serialNumber:ss ss,productionWeek:w,productionYear:y,deviceType:d,itemNumber:ii ii ii).
 
where:

Overrides:
toString in class java.lang.Object
Returns:
a string representation of this serial number data object

formatSerialNumber

public java.lang.String formatSerialNumber()
Converts this SerialNumberTO object to a String of the form:
 iiiiii dd yyww ssss.
 
where:

Returns:
a string representation of this serial number data object

clone

public java.lang.Object clone()
                       throws java.lang.CloneNotSupportedException
Returns a deep clone of this SerialNumberTO object.

Overrides:
clone in class java.lang.Object
Returns:
a deep clone of this instance
Throws:
java.lang.CloneNotSupportedException