BEA Systems, Inc.

theory.smart.axiom.units
Interface UnitList


public interface UnitList
extends Entity

The Unit List provides a cross reference for Unit such that for a specified unit the approriate Unit Conversion can be found.

 Primary Key = theory.smart.axiom.units.UnitListPk
 
                  grouping
 [UnitList] <*>------> [String] (Primary Key)

 
                  units (Map)
 [UnitList] <*>------> [theory.smart.axiom.units.UnitCategories] 
                     0..*
 

See Also:
UnitListPk, UnitListHome, UnitListImpl, UnitListValue

Method Summary
 boolean containsUnitsKey(java.lang.String key)
          Returns true if the units map contains a units for the specified key.
 boolean containsUnitsValue(UnitCategories units)
          Returns true if the units map maps one or more keys to the specified units.
 java.lang.String getGrouping()
           
 int getNumberOfUnitses()
          Returns the number of key-value mappings in the units map.
 UnitListValue getUnitListByValue()
          Get all of UnitList's attributes.
 UnitCategories getUnitsByKey(java.lang.String key)
          Returns the units to which the units map maps the specified key.
 com.sun.java.util.collections.TreeMap getUnitses()
          Returns a copy all of the unitses from the specified map to the units map.
 boolean isUnitsesEmpty()
          Returns true if the units map contains no key-value mappings.
 void putUnits(java.lang.String key, UnitCategories units)
          Associates the specified units with the specified key in the units map.
 void putUnitses(com.sun.java.util.collections.TreeMap unitses)
          Copies all of the unitses from the specified units map to this units map.
 void removeAllUnitses()
          Removes all unitses from this units map.
 UnitCategories removeUnitsByKey(java.lang.String key)
          Removes the units for this key from this units map if present.
 void setUnitListByValue(UnitListValue value)
          Set all of UnitList's attributes to the passed in value.
 
Methods inherited from interface javax.ejb.EJBObject
getEJBHome, getHandle, getPrimaryKey, isIdentical, remove
 

Method Detail

getUnitListByValue

public UnitListValue getUnitListByValue()
                                 throws java.rmi.RemoteException
Get all of UnitList's attributes.
Returns:
UnitListValue the UnitList value object

setUnitListByValue

public void setUnitListByValue(UnitListValue value)
                        throws java.rmi.RemoteException
Set all of UnitList's attributes to the passed in value. Note: Primary key attributes are not set.
Parameters:
UnitListValue - the UnitList value object

getGrouping

public java.lang.String getGrouping()
                             throws java.rmi.RemoteException

containsUnitsKey

public boolean containsUnitsKey(java.lang.String key)
                         throws java.rmi.RemoteException
Returns true if the units map contains a units for the specified key.
Parameters:
key - key whose presence in the units map is to be tested.
Returns:
true if the units map contains a units for the specified key.
Throws:
ClassCastException - if the key cannot be compared with the keys currently in the map.
NullPointerException - key is null and the units map uses natural ordering, or its comparator does not tolerate null keys.

containsUnitsValue

public boolean containsUnitsValue(UnitCategories units)
                           throws java.rmi.RemoteException
Returns true if the units map maps one or more keys to the specified units. This operation will probably require linear time.
Parameters:
units - value of units whose presence in the units map is to be tested.

getUnitsByKey

public UnitCategories getUnitsByKey(java.lang.String key)
                             throws java.rmi.RemoteException
Returns the units to which the units map maps the specified key. Returns null if the map contains no units for this key. A return value of null does not necessarily indicate that the map contains no units for the key; it's also possible that the map explicitly maps the key to null. The containsKey operation may be used to distinguish these two cases.
Parameters:
key - key whose associated units is to be returned.
Returns:
the units to which the units map maps the specified key, or null if the map contains no units for the key.
Throws:
ClassCastException - key cannot be compared with the keys currently in the map.
NullPointerException - key is null and the units map uses natural ordering, or its comparator does not tolerate null keys.
See Also:
#containsKey(Object)

getUnitses

public com.sun.java.util.collections.TreeMap getUnitses()
                                                 throws java.rmi.RemoteException
Returns a copy all of the unitses from the specified map to the units map. These unitses replace any unitses that the units map had for any of the keys currently in the specified map.
Parameters:
unitses - a copy of the unitses.
Throws:
ClassCastException - class of a key or units in the specified map prevents it from being stored in the units map.
NullPointerException - the units map does not permit null keys and a specified key is null.

getNumberOfUnitses

public int getNumberOfUnitses()
                       throws java.rmi.RemoteException
Returns the number of key-value mappings in the units map.
Returns:
the number of key-value mappings in the units map.

isUnitsesEmpty

public boolean isUnitsesEmpty()
                       throws java.rmi.RemoteException
Returns true if the units map contains no key-value mappings.

Returns:
true if the units map contains no key-value mappings.

putUnits

public void putUnits(java.lang.String key,
                     UnitCategories units)
              throws java.rmi.RemoteException
Associates the specified units with the specified key in the units map. If the map previously contained a units for this key, the old units is replaced.
Parameters:
key - key with which the specified units is to be associated.
units - units to be associated with the specified key.
Throws:
ClassCastException - key cannot be compared with the keys currently in the map.
NullPointerException - key is null and the units map uses natural order, or its comparator does not tolerate null keys.

putUnitses

public void putUnitses(com.sun.java.util.collections.TreeMap unitses)
                throws java.rmi.RemoteException
Copies all of the unitses from the specified units map to this units map. These unitses replace any unitses that this units map had for any of the keys currently in the specified map.
Parameters:
units - Unitses to be stored in the units map.
Throws:
ClassCastException - class of a key or units in the specified map prevents it from being stored in the units map.
NullPointerException - the units map does not permit null keys and a specified key is null.

removeAllUnitses

public void removeAllUnitses()
                      throws java.rmi.RemoteException
Removes all unitses from this units map.

removeUnitsByKey

public UnitCategories removeUnitsByKey(java.lang.String key)
                                throws java.rmi.RemoteException
Removes the units for this key from this units map if present.
Parameters:
key - key with which the specified units is associated.
Returns:
previous units associated with specified key, or null if there was no units for key. A null return can also indicate that the map previously associated null with the specified key.
Throws:
ClassCastException - key cannot be compared with the keys currently in the map.
NullPointerException - key is null and the units map uses natural order, or its comparator does not tolerate null keys.

BEA Systems, Inc.

Copyright © 2000 BEA Systems, Inc. All Rights Reserved