IBM WebSphere Multichannel Bank Transformation Toolkit Javadoc

com.ibm.btt.bean
Class MapCollection

java.lang.Object
  extended by com.ibm.btt.base.DataElement
      extended by com.ibm.btt.base.DataCollection
          extended by com.ibm.btt.base.KeyedCollection
              extended by com.ibm.btt.bean.MapCollection
All Implemented Interfaces:
DSECloneable, TypedData, java.io.Externalizable, java.io.Serializable, java.lang.Cloneable

public class MapCollection
extends KeyedCollection

Instances of this class contain a Map object and his parent bean This class provides a protocol for accessing the bean's attribute which type is Map by name, and for changing and removing map's identified key value.

See Also:
Serialized Form

Field Summary
 
Fields inherited from class com.ibm.btt.base.KeyedCollection
bufferSize, DEFAULT_BUFFER_SIZE, DEFAULT_COMPRESSION, elements, nestedElements, order
 
Fields inherited from class com.ibm.btt.base.DataElement
description, name, parameters, state
 
Constructor Summary
  MapCollection()
          This is the default constructor used to create a MapCollection object.
protected MapCollection(java.util.Map _map, int key, java.lang.Object parent, boolean createInstance)
           
protected MapCollection(java.util.Map _map, java.lang.Object bean, boolean createInstance)
           
 
Method Summary
 void addElement(DataElement dataElement)
          add DataElment to map,the key is dataElement's name, value is DataElement instance
 void addElement(java.lang.String name, java.lang.Object value, java.lang.String path, java.lang.String type)
          Deprecated. 
 java.lang.Object clone()
          Returns a new MapCollection cloned from the current one.
 java.lang.String getCompositeKey()
          This is an override method
 java.lang.String getDescription()
          Deprecated. 
 PropertyDescription getDescriptor()
          Deprecated. 
 Hashtable getElements()
          Deprecated. 
 int getIndexOf(int from, java.lang.String name)
          Deprecated. 
 int getIndexOf(java.lang.String name)
          Deprecated. 
 Key getKey()
          Deprecated. 
 java.util.Map getMap()
           
 Hashtable getNestedElements()
          Deprecated. 
 Hashtable getOrder()
          Deprecated. 
 java.util.Vector getOrderVector()
          Deprecated. 
 ElementState getState()
          Deprecated. 
 java.lang.Object getValue()
          Returns the elements of the keyedCollections.
 boolean isAmended()
          Deprecated. 
 boolean isCached()
          Deprecated. 
 void nestedElements(java.util.Hashtable theTable)
          Returns all the DataElements included in this collection at any level.
 Vector nestedFields()
          Deprecated. 
 Vector nestedKeyedCollections()
          Deprecated. 
 void readFromStream(java.io.ObjectInput s)
          Invokes the object creation from an ObjectInput.
 void removeAll()
          Set map to null
 DataElement removeElementAt(java.lang.String name)
          Removes the named data element.
protected  DataElement removeElementAtFirstLevel(java.lang.String name)
          remove the bean's fields value identified by its name
protected  void reorderElements(int from)
          Deprecated. 
 void setAmended(boolean value)
          Deprecated. 
 void setCompositeKey(java.lang.String compositeKey)
          Deprecated. 
 void setDescription(java.lang.String description)
          Deprecated. 
 void setDescriptor(PropertyDescription descriptor)
          Deprecated. 
 void setElements(Hashtable anElements)
          Deprecated. 
 void setIsCached(boolean cached)
          Deprecated. 
 void setMap(java.util.Map map)
           
 void setOrder(Hashtable anOrder)
          Deprecated. 
 void setOrder(Vector anOrder)
          Deprecated. 
 void setOrder(java.util.Vector anOrder)
          Deprecated. 
 void setState(ElementState state)
          Deprecated. 
 void setValue(java.lang.Object value)
          Sets the value to the KeyedCollection from a Hashtable.
 int size()
          return the map size
 DataElement tryGetElementAt(java.lang.String name)
          Returns the data element identified by its name.
 DataElement tryGetElementAtAnyLevel(java.lang.String name)
          Deprecated. 
 DataElement tryGetElementAtFirstLevel(java.lang.String name)
          Deprecated. 
 void writeToStream(java.io.ObjectOutput s)
          Provides concrete serialization handling for KeyedCollection.
 
Methods inherited from class com.ibm.btt.base.KeyedCollection
calculeNestedElements, calculeNestedQualifiedElements, getDynamic, getElementAt, getElementAt, getElementAtAnyLevel, getElementAtFirstLevel, getEnumeration, initializeFrom, isCompressable, isDynamic, readExternal, removeElementAt, setCompressable, setDynamic, setDynamic, setValueAt, setValueAt, stringValueOf, toString, toStrings, tryGetValueAt, trySetValueAt, writeExternal
 
Methods inherited from class com.ibm.btt.base.DataCollection
getValueAt, nestedElements, nestedQualifiedElements, validate
 
Methods inherited from class com.ibm.btt.base.DataElement
externalizer, getErrorInfo, getExternalizer, getName, getParameter, getParameters, getTagName, isSerializable, readExternal, readObject, removeExternal, setErrorInfo, setExternalizer, setName, setParameter, setParameters, setSerializable, toTags, validate, validateObject, writeExternal
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

MapCollection

protected MapCollection(java.util.Map _map,
                        java.lang.Object bean,
                        boolean createInstance)

MapCollection

public MapCollection()
This is the default constructor used to create a MapCollection object.


MapCollection

protected MapCollection(java.util.Map _map,
                        int key,
                        java.lang.Object parent,
                        boolean createInstance)
Method Detail

getMap

public java.util.Map getMap()

setMap

public void setMap(java.util.Map map)

tryGetElementAt

public DataElement tryGetElementAt(java.lang.String name)
Description copied from class: KeyedCollection
Returns the data element identified by its name. It is found by the path indicated in the aName parameter. The path is set by identifier strings separated by a period (.). An asterisk (*) specifies a search in any level of depth in this keyed collection.

Overrides:
tryGetElementAt in class KeyedCollection
Parameters:
name - java.lang.String - The path and name of the data element to be retrieved
Returns:
DataElement

addElement

@Deprecated
public void addElement(java.lang.String name,
                                  java.lang.Object value,
                                  java.lang.String path,
                                  java.lang.String type)
                throws DSEInvalidArgumentException,
                       java.lang.ClassNotFoundException,
                       java.lang.InstantiationException,
                       java.lang.IllegalAccessException
Deprecated. 

Description copied from class: KeyedCollection
Adds a data element (instance of aType) to the KeyedCollection when the dynamic behavior is active. This method adds the element to the position pointed to by the aPath parameter with its initial value set to aValue.

Overrides:
addElement in class KeyedCollection
Parameters:
name - java.lang.String. - The Name of the DataElement
value - Object. - The Value of the DataElement
path - java.lang.String. - The Path to the DataElement
type - java.lang.String - The Type of the DataElement
Throws:
DSEInvalidArgumentException
java.lang.ClassNotFoundException
java.lang.InstantiationException
java.lang.IllegalAccessException

clone

public java.lang.Object clone()
                       throws java.lang.CloneNotSupportedException
Returns a new MapCollection cloned from the current one.

Specified by:
clone in interface DSECloneable
Overrides:
clone in class KeyedCollection
Returns:
com.ibm.btt.base.DataElement - The new MapCollection
Throws:
java.lang.CloneNotSupportedException - - if a problem occurs trying to clone the object

addElement

public void addElement(DataElement dataElement)
add DataElment to map,the key is dataElement's name, value is DataElement instance

Overrides:
addElement in class KeyedCollection
Parameters:
dataElement - DataElement

removeAll

public void removeAll()
Set map to null

Overrides:
removeAll in class KeyedCollection

setValue

public void setValue(java.lang.Object value)
              throws DSEInvalidArgumentException
Description copied from class: KeyedCollection
Sets the value to the KeyedCollection from a Hashtable. This method first initializes the KeyedCollection and then, with the value of the parameter, gives a new value to the KeyedCollection. The nextItem, elements, netedElements and order attributes are modified.

Overrides:
setValue in class KeyedCollection
Parameters:
value - java.lang.Object - Must be a Hastable. The keys are Strings that represent the names of the dataelement and the values of this keys are the DataElements Objects.
Throws:
DSEInvalidArgumentException - - The parameter is not a Hashtable Object

getValue

public java.lang.Object getValue()
Description copied from class: KeyedCollection
Returns the elements of the keyedCollections. This method is implemented to provide polymorphism.

Overrides:
getValue in class KeyedCollection
Returns:
java.lang.Object

setOrder

@Deprecated
public void setOrder(Vector anOrder)
Deprecated. 


tryGetElementAtAnyLevel

@Deprecated
public DataElement tryGetElementAtAnyLevel(java.lang.String name)
Deprecated. 

Description copied from class: KeyedCollection
Returns the first element that matches aName at any level of depth of the keyedCollection.

Overrides:
tryGetElementAtAnyLevel in class KeyedCollection
Parameters:
name - java.lang.String - The name of the data element to be retrieved
Returns:
com.ibm.btt.base.DataElement

tryGetElementAtFirstLevel

@Deprecated
public DataElement tryGetElementAtFirstLevel(java.lang.String name)
Deprecated. 

Description copied from class: KeyedCollection
Returns the element that matches aName. This method only searches in this first level and not in other levels.

Overrides:
tryGetElementAtFirstLevel in class KeyedCollection
Parameters:
name - java.lang.String
Returns:
DataElement

getElements

@Deprecated
public Hashtable getElements()
Deprecated. 

Description copied from class: KeyedCollection
Gets the elements property (java.util.Hashtable) value.

Overrides:
getElements in class KeyedCollection
Returns:
The elements property value
See Also:
KeyedCollection.setElements(com.ibm.btt.base.Hashtable)

size

public int size()
return the map size

Overrides:
size in class KeyedCollection
Returns:
int

getIndexOf

@Deprecated
public int getIndexOf(int from,
                                 java.lang.String name)
Deprecated. 

Description copied from class: KeyedCollection
Returns the position of the element aName. The search begins at the position indicated by the from parameter.

Overrides:
getIndexOf in class KeyedCollection
Returns:
int param from int - The position from which to start the search for the data element param aName String - The name of the data element to be retrieved

getIndexOf

@Deprecated
public int getIndexOf(java.lang.String name)
Deprecated. 

Description copied from class: KeyedCollection
Returns the position of the element aName.

Overrides:
getIndexOf in class KeyedCollection
Returns:
int

getNestedElements

@Deprecated
public Hashtable getNestedElements()
Deprecated. 

Description copied from class: KeyedCollection
Gets the nested elements property (java.util.Hashtable) value.

Overrides:
getNestedElements in class KeyedCollection
Returns:
java.util.Hashtable - The nestedElements property value

getOrder

@Deprecated
public Hashtable getOrder()
Deprecated. 

Description copied from class: KeyedCollection
Gets the order property (java.util.Hashtable) value.

Overrides:
getOrder in class KeyedCollection
Returns:
java.util.Hashtable - The order property value
See Also:
KeyedCollection.setOrder(com.ibm.btt.base.Hashtable)

getOrderVector

@Deprecated
public java.util.Vector getOrderVector()
Deprecated. 

Description copied from class: KeyedCollection
Gets the order property (java.util.Vector) value.

Overrides:
getOrderVector in class KeyedCollection
Returns:
java.util.Vector - The order property value
See Also:
KeyedCollection.setOrder(com.ibm.btt.base.Hashtable)

getCompositeKey

public java.lang.String getCompositeKey()
This is an override method

Overrides:
getCompositeKey in class DataElement
Returns:
String
See Also:
KeyedColleciton.getCompositeKey()

getDescription

@Deprecated
public java.lang.String getDescription()
Deprecated. 

Description copied from class: DataElement
Returns the description of the data.

Overrides:
getDescription in class DataElement
Returns:
java.lang.String

getDescriptor

@Deprecated
public PropertyDescription getDescriptor()
Deprecated. 

Description copied from class: DataElement
Returns the PropertyDescriptor for this business object.

Specified by:
getDescriptor in interface TypedData
Overrides:
getDescriptor in class DataElement
Returns:
PropertyDescription

getKey

@Deprecated
public Key getKey()
           throws DSETypeException
Deprecated. 

Description copied from class: DataElement
Returns a Key object which can be used to identify this business object. For business objects which are not Typed, of simple Type, or simply do not support unique Keys, a Key with a value of zero is returned.

Specified by:
getKey in interface TypedData
Overrides:
getKey in class DataElement
Returns:
Key
Throws:
DSETypeException - - If the key can not be built from this business object

getState

@Deprecated
public ElementState getState()
Deprecated. 

Description copied from class: DataElement
Gets the state property.

Overrides:
getState in class DataElement
Returns:
com.ibm.btt.base.types.ElementState

isAmended

@Deprecated
public boolean isAmended()
Deprecated. 

Description copied from class: DataElement
Returns true if the amended flag is activated and false otherwise.

Overrides:
isAmended in class DataElement
Returns:
boolean

isCached

@Deprecated
public boolean isCached()
Deprecated. 

Description copied from class: DataElement
Returns the isCached.

Overrides:
isCached in class DataElement
Returns:
boolean

removeElementAt

public DataElement removeElementAt(java.lang.String name)
                            throws DSEObjectNotFoundException
Description copied from class: KeyedCollection
Removes the named data element. It is found by the path indicated in the aName parameter. The paths are set by identifier strings separated by a period (.). For security reasons the asterisk (*) is not allowed in the path aName.

Overrides:
removeElementAt in class KeyedCollection
Parameters:
name - java.lang.String
Returns:
DataElement
Throws:
DSEObjectNotFoundException

removeElementAtFirstLevel

protected DataElement removeElementAtFirstLevel(java.lang.String name)
                                         throws DSEObjectNotFoundException
remove the bean's fields value identified by its name

Overrides:
removeElementAtFirstLevel in class KeyedCollection
Parameters:
name - java.lang.String
Returns:
DataElement
Throws:
DSEObjectNotFoundException

setAmended

@Deprecated
public void setAmended(boolean value)
Deprecated. 

Description copied from class: DataElement
Sets the amended flag to aValue.

Overrides:
setAmended in class DataElement
Parameters:
value - boolean

setCompositeKey

@Deprecated
public void setCompositeKey(java.lang.String compositeKey)
Deprecated. 

Description copied from class: DataElement
Sets the compositeKey.

Overrides:
setCompositeKey in class DataElement

setDescription

@Deprecated
public void setDescription(java.lang.String description)
Deprecated. 

Description copied from class: DataElement
Sets the value of description.

Overrides:
setDescription in class DataElement
Parameters:
description - java.lang.String

setDescriptor

@Deprecated
public void setDescriptor(PropertyDescription descriptor)
Deprecated. 

Description copied from class: DataElement
Sets the PropertyDescriptor for this business object to that passed.

Specified by:
setDescriptor in interface TypedData
Overrides:
setDescriptor in class DataElement
Parameters:
descriptor - PropertyDescription

setIsCached

@Deprecated
public void setIsCached(boolean cached)
Deprecated. 

Description copied from class: DataElement
Sets the isCached.

Overrides:
setIsCached in class DataElement

setState

@Deprecated
public void setState(ElementState state)
Deprecated. 

Description copied from class: DataElement
Sets the state property.

Overrides:
setState in class DataElement
Parameters:
state - com.ibm.btt.base.types.ElementState

reorderElements

@Deprecated
protected void reorderElements(int from)
Deprecated. 

Description copied from class: KeyedCollection
Reorders all the elements from the index indicated by the from parameter to the last element.

Overrides:
reorderElements in class KeyedCollection
Parameters:
from - int

setElements

@Deprecated
public void setElements(Hashtable anElements)
Deprecated. 

Description copied from class: KeyedCollection
Sets the elements property (java.util.Hashtable) value.

Overrides:
setElements in class KeyedCollection

setOrder

@Deprecated
public void setOrder(Hashtable anOrder)
Deprecated. 

Description copied from class: KeyedCollection
Sets the order property (java.util.Vector) value from a Hashtable.

Overrides:
setOrder in class KeyedCollection

setOrder

@Deprecated
public void setOrder(java.util.Vector anOrder)
Deprecated. 

Description copied from class: KeyedCollection
Sets the order property (java.util.Hashtable) value.

Overrides:
setOrder in class KeyedCollection
Parameters:
anOrder - - The new value for the property
See Also:
KeyedCollection.getOrder()

nestedFields

@Deprecated
public Vector nestedFields()
Deprecated. 

Description copied from class: DataCollection
Returns all the DataFields at any level included in this collection.

Overrides:
nestedFields in class DataCollection
Returns:
com.ibm.btt.base.Vector

nestedKeyedCollections

@Deprecated
public Vector nestedKeyedCollections()
Deprecated. 

Description copied from class: DataCollection
Returns all the KeyedCollections at any level included in this collection.

Overrides:
nestedKeyedCollections in class DataCollection
Returns:
com.ibm.btt.base.Vector

readFromStream

public void readFromStream(java.io.ObjectInput s)
                    throws java.io.IOException,
                           java.lang.ClassNotFoundException
Description copied from class: KeyedCollection
Invokes the object creation from an ObjectInput.

Overrides:
readFromStream in class KeyedCollection
Parameters:
s - java.io.ObjectInput
Throws:
java.io.IOException
java.lang.ClassNotFoundException

writeToStream

public void writeToStream(java.io.ObjectOutput s)
                   throws java.io.IOException
Description copied from class: KeyedCollection
Provides concrete serialization handling for KeyedCollection. This method serializes the current KeyedCollection.

Overrides:
writeToStream in class KeyedCollection
Parameters:
s - java.io.ObjectOutput
Throws:
java.io.IOException

nestedElements

public void nestedElements(java.util.Hashtable theTable)
Returns all the DataElements included in this collection at any level.

Overrides:
nestedElements in class DataCollection

IBM WebSphere Multichannel Bank Transformation Toolkit Javadoc

(c) Copyright IBM Corporation 1998, 2011