|
IBM Rational Functional Tester Version 6.1 IBM Rational Functional Tester API Reference Project Version 2.0 |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.rational.test.ft.script.DatapoolScriptSupport
Provides methods for accessing rows in a datapool associated with this instance
of RationalTestScript
. In general if no datapool is
associated with this script these methods will return a null
value or
throw an appropriate exception. You can always use the dpFactory()
method to get the singleton object for the active
datapool factory
.
Refer to the datapool package
documentation for a
discussion on how to iterate over datapool contents manually.
Field Summary | |
static int |
DP_ALL
Flag to iterate over all remaining records in the datapool iterator. |
static int |
DP_DEFAULT_EQUIVALENCE_CLASS
Flag to use the default equivalence class. |
static int |
DP_SHARE_CURRENT_RECORD
Flag to share the current record in the datapool iterator. |
Constructor Summary | |
DatapoolScriptSupport()
|
Method Summary | |
boolean |
dpBoolean(int variableIndex)
Shortcut to the int value in the cell in the current record and
the specified variable index is returned. |
boolean |
dpBoolean(java.lang.String variableName)
Shortcut to the boolean value in the cell in the current row and
the specified variable name is returned. |
byte |
dpByte(int variableIndex)
Shortcut to the byte value in the cell in the current record and
the specified variable index is returned. |
byte |
dpByte(java.lang.String variableName)
Shortcut to the byte value in the cell in the current row and
the specified variable name is returned. |
char |
dpChar(int variableIndex)
Shortcut to the int value in the cell in the current record and
the specified variable index is returned. |
char |
dpChar(java.lang.String variableName)
Shortcut to the char value in the cell in the current row and
the specified variable name is returned. |
IDatapoolRecord |
dpCurrent()
The record currently available from the iterator for the associated instance of the datapool. |
boolean |
dpDone()
Returns true if the current iterator
value is null . |
double |
dpDouble(int variableIndex)
Shortcut to the double value in the cell in the current record and
the specified variable index is returned. |
double |
dpDouble(java.lang.String variableName)
Shortcut to the double value in the cell in the current row and
the specified variable name is returned. |
IDatapoolFactory |
dpFactory()
Exposes the underlying the factory object so that IDatapool instances can be opened without direct support
from the script editor. |
float |
dpFloat(int variableIndex)
Shortcut to the float value in the cell in the current record and
the specified variable index is returned. |
float |
dpFloat(java.lang.String variableName)
Shortcut to the float value in the cell in the current row and
the specified variable name is returned. |
void |
dpInitialization(java.io.File datapoolFile,
int equivalenceClassIndex,
java.lang.String iteratorClassName)
Initialization of the default datapool iterator used by this instance of RationalTestScript . |
void |
dpInitialize(IDatapool datapool,
int equivalenceClassIndex,
int iterationCount)
Initialization of the default datapool iterator used by this instance of RationalTestScript . |
int |
dpInt(int variableIndex)
Shortcut to the int value in the cell in the current record and
the specified variable index is returned. |
int |
dpInt(java.lang.String variableName)
Shortcut to the int value in the cell in the current row and
the specified variable name is returned. |
long |
dpLong(int variableIndex)
Shortcut to the long value in the cell in the current record and
the specified variable index is returned. |
long |
dpLong(java.lang.String variableName)
Shortcut to the long value in the cell in the current row and
the specified variable name is returned. |
void |
dpNext()
Increments the iterator associated with an instance of the datapool. |
void |
dpReset()
Restart the iterator associated with an instance of the datapool. |
short |
dpShort(int variableIndex)
Shortcut to the short value in the cell in the current record and
the specified variable index is returned. |
short |
dpShort(java.lang.String variableName)
Shortcut to the short value in the cell in the current row and
the specified variable name is returned. |
java.lang.String |
dpString(int variableIndex)
Shortcut to the String value in the cell in the current record and
the specified variable index is returned. |
java.lang.String |
dpString(java.lang.String variableName)
Shortcut to the String value in the cell in the current record and
the specified variable name is returned. |
void |
dpTermination(boolean terminatedByException)
Unload the datapool and datapool iterator used by this script. |
java.lang.Object |
dpValue(int variableIndex)
Shortcut to the value in the cell in the current record and
the specified variable index is returned. |
java.lang.Object |
dpValue(java.lang.String variableName)
Shortcut to the value in the cell in the current record and
the specified variable name is returned. |
IDatapool |
getDatapool()
The datapool being iterated over. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final int DP_ALL
public static final int DP_SHARE_CURRENT_RECORD
public static final int DP_DEFAULT_EQUIVALENCE_CLASS
Constructor Detail |
public DatapoolScriptSupport()
Method Detail |
public IDatapoolFactory dpFactory()
IDatapool
instances can be opened without direct support
from the script editor.
IDatapoolFactory
public void dpInitialization(java.io.File datapoolFile, int equivalenceClassIndex, java.lang.String iteratorClassName)
RationalTestScript
. This is an internal method
that should not be directly used by a script.
public void dpTermination(boolean terminatedByException)
public void dpInitialize(IDatapool datapool, int equivalenceClassIndex, int iterationCount)
RationalTestScript
. This is an internal method
that should not be directly used by a script.
public IDatapool getDatapool()
null
is returned.
public IDatapoolRecord dpCurrent()
next method
. A value of null
is
returned when the iterator is out of values.
null
.dpNext()
,
dpDone()
,
dpReset()
public boolean dpDone()
true
if the current
iterator
value is null
.
dpCurrent()
,
dpNext()
,
dpReset()
public void dpNext()
dpCurrent()
,
dpDone()
,
dpReset()
public void dpReset()
dpCurrent()
,
dpDone()
,
dpNext()
public java.lang.Object dpValue(int variableIndex)
current
record and
the specified variable index is returned. The variable index is the specified zero
based index for the cell.
An exception is thrown if this script does not have an associated datapool.
variableIndex
- The zero based index of the cell in the record.
current
record and
at the specified index.dpValue(String)
public java.lang.Object dpValue(java.lang.String variableName)
current
record and
the specified variable name is returned.
An exception is thrown if this script does not have an associated datapool.
variableName
- The variable name to locate the cell by.
current
record and
the specified variable name.dpValue(int)
public java.lang.String dpString(int variableIndex)
String
value in the cell in the current
record and
the specified variable index is returned. The variable index is the specified zero
based index for the cell.
An exception is thrown if this script does not have an associated datapool.
variableIndex
- The zero based index of the cell in the record.
current
record and
at the specified index.dpString(String)
public java.lang.String dpString(java.lang.String variableName)
String
value in the cell in the current
record and
the specified variable name is returned.
If the value in the cell is not a String
value then it is
converted to a String
before being returned.
An exception is thrown if this script does not have an associated datapool.
variableName
- The valiable name to locate the cell by.
String
value in the cell in the current
record and
the specified variable name.dpString(int)
public long dpLong(int variableIndex)
long
value in the cell in the current
record and
the specified variable index is returned. The variable index is the specified zero
based index for the cell.
An exception is thrown if this script does not have an associated datapool.
variableIndex
- The zero based index of the cell in the record.
current
record and
at the specified index.dpLong(String)
public long dpLong(java.lang.String variableName)
long
value in the cell in the current
row and
the specified variable name is returned.
If the value in the cell is not a long
value then an attempt
is made to convert the value to a long
. If the value can not
be converted a java.lang.NumberFormatException
will be thrown.
An exception is thrown if this script does not have an associated datapool.
variableName
- The variable name to locate the cell by.
long
value in the cell in the current
row and
the specified variable name.dpLong(int)
public int dpInt(int variableIndex)
int
value in the cell in the current
record and
the specified variable index is returned. The variable index is the specified zero
based index for the cell.
If the value in the cell is not a int
value then an attempt
is made to convert the value to a int
. If the value can not
be converted a java.lang.NumberFormatException
will be thrown.
An exception is thrown if this script does not have an associated datapool.
variableIndex
- The zero based index of the cell in the record.
int
value in the cell in the current
record and
at the specified index.dpInt(String)
public int dpInt(java.lang.String variableName)
int
value in the cell in the current
row and
the specified variable name is returned.
If the value in the cell is not a int
value then an attempt
is made to convert the value to a int
. If the value can not
be converted a java.lang.NumberFormatException
will be thrown.
An exception is thrown if this script does not have an associated datapool.
variableName
- The variable name to locate the cell by.
int
value in the cell in the current
row and
the specified variable name.dpInt(int)
public short dpShort(int variableIndex)
short
value in the cell in the current
record and
the specified variable index is returned. The variable index is the specified zero
based index for the cell.
If the value in the cell is not a short
value then an attempt
is made to convert the value to a short
. If the value can not
be converted a java.lang.NumberFormatException
will be thrown.
An exception is thrown if this script does not have an associated datapool.
variableIndex
- The zero based index of the cell in the record.
short
value in the cell in the current
record and
at the specified index.dpShort(String)
public short dpShort(java.lang.String variableName)
short
value in the cell in the current
row and
the specified variable name is returned.
If the value in the cell is not a short
value then an attempt
is made to convert the value to a short
. If the value can not
be converted a java.lang.NumberFormatException
will be thrown.
An exception is thrown if this script does not have an associated datapool.
variableName
- The variable name to locate the cell by.
short
value in the cell in the current
row and
the specified variable name.dpShort(int)
public byte dpByte(int variableIndex)
byte
value in the cell in the current
record and
the specified variable index is returned. The variable index is the specified zero
based index for the cell.
If the value in the cell is not a byte
value then an attempt
is made to convert the value to a byte
. If the value can not
be converted a java.lang.NumberFormatException
will be thrown.
An exception is thrown if this script does not have an associated datapool.
variableIndex
- The zero based index of the cell in the record.
byte
value in the cell in the current
record and
at the specified index.dpByte(String)
public byte dpByte(java.lang.String variableName)
byte
value in the cell in the current
row and
the specified variable name is returned.
If the value in the cell is not a byte
value then an attempt
is made to convert the value to a byte
. If the value can not
be converted a java.lang.NumberFormatException
will be thrown.
An exception is thrown if this script does not have an associated datapool.
variableName
- The variable name to locate the cell by.
byte
value in the cell in the current
row and
the specified variable name.dpByte(int)
public double dpDouble(int variableIndex)
double
value in the cell in the current
record and
the specified variable index is returned. The variable index is the specified zero
based index for the cell.
If the value in the cell is not a double
value then an attempt
is made to convert the value to a double
. If the value can not
be converted a java.lang.NumberFormatException
will be thrown.
An exception is thrown if this script does not have an associated datapool.
variableIndex
- The zero based index of the cell in the record.
double
value in the cell in the current
record and
at the specified index.dpDouble(String)
public double dpDouble(java.lang.String variableName)
double
value in the cell in the current
row and
the specified variable name is returned.
If the value in the cell is not a double
value then an attempt
is made to convert the value to a double
. If the value can not
be converted a java.lang.NumberFormatException
will be thrown.
An exception is thrown if this script does not have an associated datapool.
variableName
- The variable name to locate the cell by.
double
value in the cell in the current
row and
the specified variable name.dpDouble(int)
public float dpFloat(int variableIndex)
float
value in the cell in the current
record and
the specified variable index is returned. The variable index is the specified zero
based index for the cell.
If the value in the cell is not a float
value then an attempt
is made to convert the value to a float
. If the value can not
be converted a java.lang.NumberFormatException
will be thrown.
An exception is thrown if this script does not have an associated datapool.
variableIndex
- The zero based index of the cell in the record.
float
value in the cell in the current
record and
at the specified index.dpFloat(String)
public float dpFloat(java.lang.String variableName)
float
value in the cell in the current
row and
the specified variable name is returned.
If the value in the cell is not a float
value then an attempt
is made to convert the value to a float
. If the value can not
be converted a java.lang.NumberFormatException
will be thrown.
An exception is thrown if this script does not have an associated datapool.
variableName
- The variable name to locate the cell by.
float
value in the cell in the current
row and
the specified variable name.dpFloat(int)
public boolean dpBoolean(int variableIndex)
int
value in the cell in the current
record and
the specified variable index is returned. The variable index is the specified zero
based index for the cell.
If the value in the cell is not a boolean
value then an attempt
is made to convert the value to a boolean
. If the value can not
be converted an appropriate exception will be thrown.
An exception is thrown if this script does not have an associated datapool.
variableIndex
- The zero based index of the cell in the record.
boolean
value in the cell in the current
record and
at the specified index.dpBoolean(String)
public boolean dpBoolean(java.lang.String variableName)
boolean
value in the cell in the current
row and
the specified variable name is returned.
If the value in the cell is not a boolean
value then an attempt
is made to convert the value to a boolean
. If the value can not
be converted an appropriate exception will be thrown.
An exception is thrown if this script does not have an associated datapool.
variableName
- The variable name to locate the cell by.
boolean
value in the cell in the current
row and
the specified variable name.dpBoolean(int)
public char dpChar(int variableIndex)
int
value in the cell in the current
record and
the specified variable index is returned. The variable index is the specified zero
based index for the cell.
If the value in the cell is not a char
value then an attempt
is made to convert the value to a char
. If more then one
character is represented in the value only the first character will be
returned.
An exception is thrown if this script does not have an associated datapool.
variableIndex
- The zero based index of the cell in the record.
char
value in the cell in the current
record and
at the specified index.dpChar(String)
public char dpChar(java.lang.String variableName)
char
value in the cell in the current
row and
the specified variable name is returned.
If the value in the cell is not a char
value then an attempt
is made to convert the value to a char
. If more then one
character is represented in the value only the first character will be
returned.
An exception is thrown if this script does not have an associated datapool.
variableName
- The variable name to locate the cell by.
char
value in the cell in the current
row and
the specified variable name.dpChar(int)
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |