IBM Rational Functional Tester
Version 8.2.1
IBM Rational Functional Tester API Reference

Project Version 2.3

com.rational.test.ft.services
Class DatapoolStoreValue

java.lang.Object
  extended by com.rational.test.ft.services.DatapoolStoreValue

public class DatapoolStoreValue
extends java.lang.Object


Constructor Summary
DatapoolStoreValue()
           
 
Method Summary
 int compare(java.lang.Object left, java.lang.Object right, ICompareValueClass nested)
          Compares objects supported by this value class manager and returns a result in the range 0 to 100.
 java.lang.Object createValue(java.lang.Object sourceToCopy)
          Copies an object of the managed class.
 java.lang.String getCanonicalName()
          Returns a canonical name for the value class that uniquely identifies the streamed format of the data associated with this class.
 java.lang.String getClassName()
           
 java.lang.Object persistIn(IPersistIn persist, IAuxiliaryDataManager auxData)
          Pulls data from a supplied input object.
 void persistOut(java.lang.Object theObject, IPersistOut persist, IAuxiliaryDataManager auxData)
          Pushes the significant data associated with an object into the specified output object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DatapoolStoreValue

public DatapoolStoreValue()
Method Detail

compare

public int compare(java.lang.Object left,
                   java.lang.Object right,
                   ICompareValueClass nested)
Compares objects supported by this value class manager and returns a result in the range 0 to 100. If the objects are equivalent, this method returns 100. If the objects have no similarities, 0 is returned. If the objects are partially equivalent, than an appropriate value between 0 and 100 will be returned. Typically, only 0 and 100 are returned by an implementation (based on straight equality ((left.equals(right)) ? 100 : 0 )).

An example of when a value other then 0 or 100 is returned is a caption. Window captions commonly contain dynamic information, such as a file name or date type information. A partial match on a caption might return 50 rather than 0 or 100.

Parameters:
left - The first object in the comparison.
right - The second object in the comparison.
nested - An object that can perform nested complex compare actions.
Returns:
An integer value in the range 0 to 100 that depicts the level of equality. 100 is a match.

createValue

public java.lang.Object createValue(java.lang.Object sourceToCopy)
Copies an object of the managed class. The copy does not have to be a deep copy and should return null if a copy operation is not be performed. The primary use of this method is to shear property methods returning extended instances of the expected class. For instance, if java.awt.Point is the expected return type, however mycompany.MyPoint (which extends the AWT Point class) is actually returned, then the returned object must be sheared before it can be used as a Point property. To get the MyPoint object use, an IManageValueClass must be created for the new class.

Parameters:
sourceToCopy - An instance of the associated value class.
Returns:
A pure copy of the expected value class.

getCanonicalName

public java.lang.String getCanonicalName()
Returns a canonical name for the value class that uniquely identifies the streamed format of the data associated with this class. Verification point data can be read on more than one platform by using multiple languages. The data format remains the same, however the associated IManageValueClass may vary from platform to platform. This method returns a name that does not vary between platforms.

For instance, rational.hashtable may be returned for the set of key/value pairs associated with a java.util.hashtable. On another platform this data may be read into a C++ STL grid type object. The data can be read because a canonical name for the value class has been associated with the data. Note that the name in this example uses the rational company name so that this value class name for a hashtable does not conflict with another company.

This name is automatically added to the data stream for an IManageValueClass mapped object and therefore does not need to be explicitly added by an implementation of persistOut.

Returns:
The canonical name for the value class.

getClassName

public java.lang.String getClassName()

persistIn

public java.lang.Object persistIn(IPersistIn persist,
                                  IAuxiliaryDataManager auxData)
Pulls data from a supplied input object. The data must be pulled in the same order in which it was pushed by persistOut.

An instance of IAuxiliaryDataManager is supplied that must be used to locate auxiliary data files. Auxiliary data files has to follow the supplied naming convention.

Parameters:
persist - The input stream that data is pulled out of.
auxData - The auxiliary data interface used for naming associated data files.
Returns:
The object extracted from the data stream.
See Also:
persistOut(Object,IPersistOut,IAuxiliaryDataManager)

persistOut

public void persistOut(java.lang.Object theObject,
                       IPersistOut persist,
                       IAuxiliaryDataManager auxData)
Pushes the significant data associated with an object into the specified output object. Note that the data persisted must be either a primitive type or have a IManageValueClass in the value class map to support the data class.

An instance of IAuxiliaryDataManager is supplied that must be used to name auxiliary data files.

Parameters:
theObject - The object that is to be inserted into the supplied output stream.
persist - The output stream to insert data into.
auxData - The auxiliary data interface used for naming associated data files.
See Also:
persistIn(IPersistIn,IAuxiliaryDataManager), #persistIn(IPersistInNamed,IAuxiliaryDataManager), IPersistOut, IAuxiliaryDataManager