wt.units.service
Class DefaultDisplayUnitsHolder

java.lang.Object
  extended bywt.lite.AbstractLiteObject
      extended bywt.units.service.DefaultDisplayUnitsHolder
All Implemented Interfaces:
Cloneable, Externalizable, Liteable, LiteDisplayUnitsHolder, LocalizedStringDisplayable, Serializable

public class DefaultDisplayUnitsHolder
extends AbstractLiteObject
implements LiteDisplayUnitsHolder, Externalizable



Supported API: false

Extendable: false

See Also:
Serialized Form

Field Summary
private static String CLASSNAME
           
private  Hashtable defaultDisplayUnits
           
private  Hashtable displayUnits
           
static long EXTERNALIZATION_VERSION_UID
           
protected static long OLD_FORMAT_VERSION_UID
           
private static String RESOURCE
           
(package private) static long serialVersionUID
           
 
Fields inherited from class wt.lite.AbstractLiteObject
ILLEGAL_ACCESS, SERVER
 
Fields inherited from interface wt.lite.Liteable
UPDATE_COUNT
 
Constructor Summary
DefaultDisplayUnitsHolder()
          

Supported API: false
 
Method Summary
 Object clone()
          

Supported API: false
 Enumeration defaultDisplayUnitsKeys()
          Returns the keys to the default measurement system display units hashtable keys.
 Enumeration displayUnitsKeys()
          Returns an enumeration of the keys to the internal hashtable.
 String getDefaultDisplayUnitString(String measurementSystemName)
          Gets the default unit display string given the MeasurementSystem name .
 String getDisplayUnitString(String measurementSystemName)
          Given a MeasurementSystem name as key, return the displayUnitString as return value.
 void readExternal(ObjectInput input)
          Reads the non-transient fields of this class from an external source.
private  boolean readOldVersion(ObjectInput input, long readSerialVersionUID, boolean passThrough, boolean superDone)
          Reads the non-transient fields of this class from an external source, which is not the current version.
protected  boolean readVersion(DefaultDisplayUnitsHolder thisObject, ObjectInput input, long readSerialVersionUID, boolean passThrough, boolean superDone)
          Reads the non-transient fields of this class from an external source.
 void setDefaultDisplayUnitString(String measurementSystemName, String defaultDisplayUnit)
          Sets the default display unit string given the MeasurementSystem name as key.
 void setDisplayUnitString(String measurementSystemName, String unitDisplayInfoString)
          Sets a MeasurementSystem name as key, and an unitDisplayInfo String as value.
 void writeExternal(ObjectOutput output)
          Writes the non-transient fields of this class to an external source.
 
Methods inherited from class wt.lite.AbstractLiteObject
compareUpdateCount, getHeavyObjectClassname, getLocalizedDisplayString, getObjectID, getUpdateCount, isPersistedObjectEqual, readVersion, setLocalizedDisplayString, setObjectID, setUpdateCount
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

RESOURCE

private static final String RESOURCE
See Also:
Constant Field Values

CLASSNAME

private static final String CLASSNAME

displayUnits

private Hashtable displayUnits

defaultDisplayUnits

private Hashtable defaultDisplayUnits

serialVersionUID

static final long serialVersionUID
See Also:
Constant Field Values

EXTERNALIZATION_VERSION_UID

public static final long EXTERNALIZATION_VERSION_UID
See Also:
Constant Field Values

OLD_FORMAT_VERSION_UID

protected static final long OLD_FORMAT_VERSION_UID
See Also:
Constant Field Values
Constructor Detail

DefaultDisplayUnitsHolder

public DefaultDisplayUnitsHolder()


Supported API: false

Method Detail

writeExternal

public void writeExternal(ObjectOutput output)
                   throws IOException
Writes the non-transient fields of this class to an external source.

Supported API: false

Specified by:
writeExternal in interface Externalizable
Overrides:
writeExternal in class AbstractLiteObject
Parameters:
output -
Throws:
IOException

readExternal

public void readExternal(ObjectInput input)
                  throws IOException,
                         ClassNotFoundException
Reads the non-transient fields of this class from an external source.

Supported API: false

Specified by:
readExternal in interface Externalizable
Overrides:
readExternal in class AbstractLiteObject
Parameters:
input -
Throws:
IOException
ClassNotFoundException

readVersion

protected boolean readVersion(DefaultDisplayUnitsHolder thisObject,
                              ObjectInput input,
                              long readSerialVersionUID,
                              boolean passThrough,
                              boolean superDone)
                       throws IOException,
                              ClassNotFoundException
Reads the non-transient fields of this class from an external source.

Supported API: false

Parameters:
thisObject -
input -
readSerialVersionUID -
passThrough -
superDone -
Returns:
boolean
Throws:
IOException
ClassNotFoundException

readOldVersion

private boolean readOldVersion(ObjectInput input,
                               long readSerialVersionUID,
                               boolean passThrough,
                               boolean superDone)
                        throws IOException,
                               ClassNotFoundException
Reads the non-transient fields of this class from an external source, which is not the current version.

Parameters:
input -
readSerialVersionUID -
passThrough -
superDone -
Returns:
boolean
Throws:
IOException
ClassNotFoundException

getDisplayUnitString

public String getDisplayUnitString(String measurementSystemName)
Given a MeasurementSystem name as key, return the displayUnitString as return value.

Supported API: false

Specified by:
getDisplayUnitString in interface LiteDisplayUnitsHolder
Parameters:
measurementSystemName -
Returns:
String

setDisplayUnitString

public void setDisplayUnitString(String measurementSystemName,
                                 String unitDisplayInfoString)
Sets a MeasurementSystem name as key, and an unitDisplayInfo String as value. Stores internally in Hashtable.

Supported API: false

Specified by:
setDisplayUnitString in interface LiteDisplayUnitsHolder
Parameters:
measurementSystemName -
unitDisplayInfoString -

displayUnitsKeys

public Enumeration displayUnitsKeys()
Returns an enumeration of the keys to the internal hashtable.

Supported API: false

Specified by:
displayUnitsKeys in interface LiteDisplayUnitsHolder
Returns:
Enumeration

getDefaultDisplayUnitString

public String getDefaultDisplayUnitString(String measurementSystemName)
Gets the default unit display string given the MeasurementSystem name .

Supported API: false

Specified by:
getDefaultDisplayUnitString in interface LiteDisplayUnitsHolder
Parameters:
measurementSystemName -
Returns:
String

setDefaultDisplayUnitString

public void setDefaultDisplayUnitString(String measurementSystemName,
                                        String defaultDisplayUnit)
Sets the default display unit string given the MeasurementSystem name as key.

Supported API: false

Specified by:
setDefaultDisplayUnitString in interface LiteDisplayUnitsHolder
Parameters:
measurementSystemName -
defaultDisplayUnit -

defaultDisplayUnitsKeys

public Enumeration defaultDisplayUnitsKeys()
Returns the keys to the default measurement system display units hashtable keys.

Supported API: false

Specified by:
defaultDisplayUnitsKeys in interface LiteDisplayUnitsHolder
Returns:
Enumeration

clone

public Object clone()


Supported API: false

Specified by:
clone in interface LiteDisplayUnitsHolder
Overrides:
clone in class AbstractLiteObject
Returns:
Object