com.ibm.eismocker.rmidriver
Class DataMap

java.lang.Object
  extended by com.ibm.eismocker.rmidriver.DataMap
All Implemented Interfaces:
java.io.Serializable

public class DataMap
extends java.lang.Object
implements java.io.Serializable

A class which defines the data structure in the EIS Mocker.

See Also:
Serialized Form

Constructor Summary
DataMap(java.lang.String name)
          Constructor for the top level DataMap.
 
Method Summary
 DataMap createDataMap(java.lang.String key, boolean isMany)
          Create one empty child DataMap according to the specified attribute key, and then return the created DataMap.
 java.lang.Object get(java.lang.String key)
          Get the attribute value according to the specified attribute key.
 DataMap getDataMap(java.lang.String key)
          Get the child DataMap according to the specified attribute key.
 java.util.List<DataMap> getList(java.lang.String key)
          Get the child DataMap list according to the specified attribute key.
 java.lang.String getName()
          Get the name of the DataMap.
 java.util.Set<java.lang.String> keySet()
          Get the keySet of the DataMap.
 void set(java.lang.String key, java.lang.Object value)
          Set the attribute value.
 void setName(java.lang.String name)
          Set the name of the DataMap.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DataMap

public DataMap(java.lang.String name)
Constructor for the top level DataMap. Construct one DataMap instance with the specified name.

Parameters:
name - The name of the DataMap.
Method Detail

getName

public java.lang.String getName()
Get the name of the DataMap.

Returns:
String

setName

public void setName(java.lang.String name)
Set the name of the DataMap.

Parameters:
name - The name of the DataMap.

get

public java.lang.Object get(java.lang.String key)
Get the attribute value according to the specified attribute key.

Parameters:
key - The attribute key.
Returns:
Object

set

public void set(java.lang.String key,
                java.lang.Object value)
Set the attribute value.

Parameters:
key - The attribute key.
value - The attribute value.

getList

public java.util.List<DataMap> getList(java.lang.String key)
Get the child DataMap list according to the specified attribute key.

Parameters:
key - The attribute key.
Returns:
List

getDataMap

public DataMap getDataMap(java.lang.String key)
Get the child DataMap according to the specified attribute key.

Parameters:
key - The attribute key.
Returns:
DataMap

keySet

public java.util.Set<java.lang.String> keySet()
Get the keySet of the DataMap.

Returns:
Set

createDataMap

public DataMap createDataMap(java.lang.String key,
                             boolean isMany)
Create one empty child DataMap according to the specified attribute key, and then return the created DataMap.

Parameters:
key - The attribute key.
isMany - Specify if the child DataMap is N-Cardinality or 1-Cardinality relationship.
Returns:
DataMap