SilverStream
Application Server 3.5

com.sssw.rt.util
Class AgoVectorRowCursor

java.lang.Object
 |
 +--com.sssw.rt.util.AgoVectorRowCursor
All Implemented Interfaces:
AgiBandDescriptor, AgiRowCursor, AgiRowCursorSort, AgiRowSetDescriptor, AgiRowSetEventProducer, Cloneable, Serializable

public class AgoVectorRowCursor
extends Object
implements AgiRowCursor, AgiRowSetEventProducer, AgiRowSetDescriptor, AgiBandDescriptor, AgiRowCursorSort, Cloneable, Serializable

This helper class implements AgiRowCursor given an array of column names and a vector of data.

See Also:
Serialized Form

Fields inherited from interface com.sssw.rt.util.AgiRowCursor
BANDNAME, ORDINAL
 
Constructor Summary
AgoVectorRowCursor()
           
 
Method Summary
 void setResultSet(Vector data)
          Supply the vector of data.
 void setRowDescription(String[] columnNames)
          Specify column names
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods implemented from interface com.sssw.rt.util.AgiBandDescriptor
canQueryColumn, getBandName, getColumnCount, getColumnName, getColumnType, getPrimaryTableName
 
Methods implemented from interface com.sssw.rt.util.AgiRowCursor
addAgiRowCursorListener, allowsChildren, appendChild, copy, delete, getProperty, getProperty, getPropertyCount, getPropertyIndex, getPropertyName, getRowSetEventProducer, gotoChild, gotoFirst, gotoLast, gotoNext, gotoParent, gotoPrevious, gotoRoot, hasChildren, insertAfter, insertBefore, makePrimaryVersion, removeAgiRowCursorListener, setProperty, setProperty
 
Methods implemented from interface com.sssw.rt.util.AgiRowCursorSort
rowCursorSort
 
Methods implemented from interface com.sssw.rt.util.AgiRowSetDescriptor
getBandDescriptors, getRowSetImage, getRowSetName
 
Methods implemented from interface com.sssw.rt.util.AgiRowSetEventProducer
addAgiRowSetListener, removeAgiRowSetListener
 

Constructor Detail

AgoVectorRowCursor

public AgoVectorRowCursor()
Method Detail

setRowDescription

public void setRowDescription(String[] columnNames)
Specify column names
Parameters:
columnNames - an array of column names
Example:
 	String colNames[] = {"ID", "FirstName", "LastName");
 	myRC.setRowDescription(colNames);
 
See Also:
AgoVectorRowCursor.setResultSet(Vector)

setResultSet

public void setResultSet(Vector data)
Supply the vector of data.
Parameters:
data - a Vector containing row data. Each element of the vector should be an array of objects, containing the column values for the row.
Usage:

If this method is never called, the row cursor is initialized with no rows. Calling the insertAfter() method will insert a new row containing null values for each column.

Example:
 	AgoVectorRowCursor myRC = new AgoVectorRowCursor();
 	Vector myData = new Vector();
 	Object rowData[] = {new Integer(1), "Bob", "Smith"};
 	myData.addElement(rowData);
 	Object rowData[] = {new Integer(2), "Jane", "Doe"};
 	myData.addElement(rowData);
 	Object rowData[] = {new Integer(3), "Chris", "Random"};
 	myData.addElement(rowData);
 	myRC.setResultSet(myData);
 
See Also:
AgoVectorRowCursor.setRowDescription(String [])

SilverStream
Application Server 3.5