com.ibm.rational.test.lt.kernel
Interface IDataArea


public interface IDataArea

The IDataArea interface defines functionality for data areas.

A DataArea is a container for Container attributes. The elements of a DataArea are similar to program variables and are scoped to the owning container.


Field Summary
static java.lang.String ENGINE
          The name of the DataArea provided at the engine level.
static java.lang.String TEST
          The name of the DataArea provided for each test script.
static java.lang.String VIRTUALUSER
          The name of the DataArea provided for each virtual user.
 
Method Summary
 boolean containsKey(java.lang.Object key)
          Returns true if there is a mapping for the specified key.
 boolean containsValue(java.lang.Object value)
          Returns true if there is an entry for this value.
 java.lang.Object get(java.lang.Object key)
          Retrieves an object from the current DataArea.
 java.lang.String getName()
          Returns the name of the specified DataArea.
 void lock()
          Locks the entire DataArea.
 void lock(java.lang.Object key)
          Locks the specified key.
 java.lang.Object put(java.lang.Object key, java.lang.Object value)
          Adds an object to the DataArea.
 java.lang.Object remove(java.lang.Object key)
          Removes the object with the given key from the DataArea.
 

Field Detail

ENGINE

public static final java.lang.String ENGINE
The name of the DataArea provided at the engine level.

See Also:
Constant Field Values

VIRTUALUSER

public static final java.lang.String VIRTUALUSER
The name of the DataArea provided for each virtual user.

See Also:
Constant Field Values

TEST

public static final java.lang.String TEST
The name of the DataArea provided for each test script.

See Also:
Constant Field Values
Method Detail

get

public java.lang.Object get(java.lang.Object key)
Retrieves an object from the current DataArea.

Returns the object value to which the key is currently mapped or null if there is no mapping for this key. Note that it is possible for the key to map to a null value. Use the containsKey method to distinguish between these two cases.

Returns:
IDataItem The DataArea that corresponds to the specified key.

put

public java.lang.Object put(java.lang.Object key,
                            java.lang.Object value)
Adds an object to the DataArea.

Associates the specified value with the specified key in this map. If the map previously contained a mapping for this key, the old value is replaced.

Returns:
The object that the previous value associated with the specified key, or null if there was no mapping for the key. A null return can also indicate that the HashMap previously associated null with the specified key.

containsKey

public boolean containsKey(java.lang.Object key)
Returns true if there is a mapping for the specified key.

Returns:
Boolean true if there is a mapping for the specified key. false if there is no mapping for this key.

containsValue

public boolean containsValue(java.lang.Object value)
Returns true if there is an entry for this value.

Returns:
Boolean true if the DataArea contains the specified value. false if this value is not in the DataArea.

getName

public java.lang.String getName()
Returns the name of the specified DataArea.

Returns:
String DataArea name.

remove

public java.lang.Object remove(java.lang.Object key)
Removes the object with the given key from the DataArea.

Parameters:
key -
Returns:
The object is removed.

lock

public void lock()
Locks the entire DataArea.

Causes subsequent put() and remove() calls to fail for this key.


lock

public void lock(java.lang.Object key)
Locks the specified key.

Causes subsequent put() and remove() calls to fail for this key.

Parameters:
key -


Copyright (c) IBM Corp. and others 2005. All rights reserved