BEA Systems, Inc.

theory.smart.axiom.units
Class UnitListImpl

java.lang.Object
  |
  +--theory.smart.foundation.EntityImpl
        |
        +--theory.smart.axiom.units.UnitListImpl

public class UnitListImpl
extends EntityImpl

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
 

See Also:
UnitList, UnitListHome, UnitListValue, Serialized Form

Field Summary
 java.lang.String grouping
           grouping [UnitList] <*>------> [String] (Primary Key)
 com.sun.java.util.collections.TreeMap unitses
           units (Map) [UnitList] <*>------> [theory.smart.axiom.units.UnitCategories] 0..*
 
Fields inherited from class theory.smart.foundation.EntityImpl
ctx, isDirty, isLoaded
 
Constructor Summary
UnitListImpl()
           
 
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.
 void ejbActivate()
          ejbActivate method.
 UnitListPk ejbCreate(UnitListPk unitListPk)
           
 java.util.Enumeration ejbFindAll()
           
 UnitListPk ejbFindByPrimaryKey(UnitListPk pk)
           
 void ejbLoad()
          ejbLoad method.
 void ejbPassivate()
          ejbPassivate method.
 void ejbPostCreate(UnitListPk unitListPk)
           
 void ejbRemove()
          ejbRemove method.
 void ejbStore()
          ejbStore method.
 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 setEntityContext(javax.ejb.EntityContext ctx)
          setEntityContext method.
 void setUnitListByValue(UnitListValue value)
          Set all of UnitList's attributes to the passed in value.
 void unsetEntityContext()
          unsetEntityContext method.
 
Methods inherited from class theory.smart.foundation.EntityImpl
ejbCreate, ejbPostCreate, getEntityContext, isModified
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

grouping

public java.lang.String grouping
                  grouping
 [UnitList] <*>------> [String] (Primary Key)

 

unitses

public com.sun.java.util.collections.TreeMap unitses
                  units (Map)
 [UnitList] <*>------> [theory.smart.axiom.units.UnitCategories] 
                     0..*
 
Constructor Detail

UnitListImpl

public UnitListImpl()
             throws javax.ejb.CreateException
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

ejbCreate

public UnitListPk ejbCreate(UnitListPk unitListPk)
                     throws javax.ejb.CreateException,
                            java.rmi.RemoteException

ejbPostCreate

public void ejbPostCreate(UnitListPk unitListPk)
                   throws javax.ejb.CreateException,
                          java.rmi.RemoteException

ejbLoad

public void ejbLoad()
             throws java.rmi.RemoteException
Description copied from class: EntityImpl
ejbLoad method.
Overrides:
ejbLoad in class EntityImpl

ejbStore

public void ejbStore()
              throws java.rmi.RemoteException
Description copied from class: EntityImpl
ejbStore method.
Overrides:
ejbStore in class EntityImpl

ejbRemove

public void ejbRemove()
               throws java.rmi.RemoteException,
                      javax.ejb.RemoveException
Description copied from class: EntityImpl
ejbRemove method.
Overrides:
ejbRemove in class EntityImpl

ejbActivate

public void ejbActivate()
                 throws java.rmi.RemoteException
Description copied from class: EntityImpl
ejbActivate method.
Overrides:
ejbActivate in class EntityImpl

ejbPassivate

public void ejbPassivate()
                  throws java.rmi.RemoteException
Description copied from class: EntityImpl
ejbPassivate method.
Overrides:
ejbPassivate in class EntityImpl

setEntityContext

public void setEntityContext(javax.ejb.EntityContext ctx)
                      throws java.rmi.RemoteException
Description copied from class: EntityImpl
setEntityContext method.
Overrides:
setEntityContext in class EntityImpl

unsetEntityContext

public void unsetEntityContext()
                        throws java.rmi.RemoteException
Description copied from class: EntityImpl
unsetEntityContext method.
Overrides:
unsetEntityContext in class EntityImpl

ejbFindByPrimaryKey

public UnitListPk ejbFindByPrimaryKey(UnitListPk pk)
                               throws javax.ejb.FinderException,
                                      java.rmi.RemoteException

ejbFindAll

public java.util.Enumeration ejbFindAll()
                                 throws javax.ejb.FinderException,
                                        java.rmi.RemoteException

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