|
Rational QualityArchitect/Java API Version 1.0 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.rational.test.vp.DatabaseVPData
This class encapsulates and serializes the data being verified by the database verification point.
The data that this class stores is conceptually just a recordset. The
data is stored in two data constructs represented in the
DataTable
interface:
If you want to build a DatabaseVPData
object by hand
in order to run a dynamic verification point, you can do so by populating
the Columns and Data objects using the get...
and set...
methods provided in this class.
You can find an example of a hand-built DatabaseVPData
object in the section
Example of a Dynamic Database Verification Point.
DatabaseVP
Constructor Summary | |
DatabaseVPData()
|
Method Summary | |
java.lang.String[] |
getColumns()
This method retrieves the column names in the table. |
java.util.Vector |
getData()
This method retrieves data from the table. |
java.lang.String |
getFileExtension()
This method returns the extension of the file used to store the data object. |
int |
getNumCols()
This method retrieves the number of columns in the table. |
int |
getNumRows()
This method retrieves the number of rows in the table. |
void |
readFile(java.io.InputStream in)
This method reads the expected or actual data object from the specified InputStream. |
void |
setColumns(java.lang.String[] asColumns)
This method specifies the column names in the table. |
void |
setData(java.util.Vector vData)
This method specifies the data in the table. |
void |
writeFile(java.io.OutputStream out)
This method writes the expected or actual data object to the specified OutputStream. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public DatabaseVPData()
Method Detail |
public java.lang.String[] getColumns()
DataTable
getColumns
in interface DataTable
com.rational.test.vp.DataTable
public java.util.Vector getData()
DataTable
getData
in interface DataTable
com.rational.test.vp.DataTable
public java.lang.String getFileExtension()
VerificationPointData
This method returns the extension of the file used to store the data object. The framework uses the file extension to determine the type of file format to use when it serializes files (for example, a CSV extension indicates a comma-separated-value text file).
Note: In the current release, CSV is the only supported file format. Other formats will be supported in future releases.
getFileExtension
in interface VerificationPointData
com.rational.test.vp.VerificationPointData
public int getNumCols()
DataTable
getNumCols
in interface DataTable
com.rational.test.vp.DataTable
public int getNumRows()
DataTable
getNumRows
in interface DataTable
com.rational.test.vp.DataTable
public void readFile(java.io.InputStream in) throws java.io.IOException, java.lang.ClassNotFoundException
VerificationPointData
This method reads the expected or actual data object from the specified InputStream.
readFile
in interface VerificationPointData
com.rational.test.vp.VerificationPointData
in
- The InputStream from which the object is read.java.io.IOException
- An input/output error has occurred.public void setColumns(java.lang.String[] asColumns)
DataTable
setColumns
in interface DataTable
com.rational.test.vp.DataTable
asColumns
- The array of the column names in the table.public void setData(java.util.Vector vData)
DataTable
Vector
is an array of strings containing one row of data.setData
in interface DataTable
com.rational.test.vp.DataTable
vData
- The data in the table.public void writeFile(java.io.OutputStream out) throws java.io.IOException
VerificationPointData
This method writes the expected or actual data object to the specified OutputStream.
writeFile
in interface VerificationPointData
com.rational.test.vp.VerificationPointData
out
- The OutputStream to which the object is written.java.io.IOException
- An input/output error has occurred.
|
30-Jun-2003 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |