|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.tivoli.twg.engine.TWGDbResultSet
This class contains a set of rows returned by a query and information about columns * of the result set. The data stored in the TWGDbResultSet object is retrieved through * a set of get methods that allow access to the various columns of the current row. *
Constructor Summary | |
---|---|
TWGDbResultSet()
Constructor for TWGDbResultSet * |
|
TWGDbResultSet(byte[] rowBuf,
byte[] columnBuf)
This method is public as an implementation side effect. |
|
TWGDbResultSet(Command cmd)
This method is public as an implementation side effect. |
|
TWGDbResultSet(long qId)
Constructor for TWGDbResultSet |
|
TWGDbResultSet(java.lang.Long qId)
Constructor for TWGDbResultSet |
Method Summary | |
---|---|
protected void |
addColumnMetaData(java.lang.String table_column,
int columnId,
TWGDbQueryColumn columnMeta)
* Put column meta information into the result set. |
protected void |
addColumnMetaData(java.lang.String table_column,
java.lang.String columnName,
int columnId,
TWGDbQueryColumn columnMeta)
* Put column meta information into the result set. |
protected void |
addRow(TWGDbRow value)
Insert a row into the result set. |
int |
getColumnCount()
Get the number of columns in the TWGDbResultSet object. |
int |
getColumnId(java.lang.String columnToken)
The instance method maps column token name into its column number. |
Vect |
getColumns()
Get all the TWGDbQueryColumn objects for result set. |
int[] |
getColumnTypes()
Gets column types for all the columns in the query result. |
double |
getDouble(int columnIndex)
Get the value of the designated column from the current row as a double. |
double |
getDouble(java.lang.String columnToken)
Get the value of the designated column from the current row as a double. |
float |
getFloat(int columnIndex)
Get the value of the designated column from the current row as a float. |
float |
getFloat(java.lang.String columnToken)
Get the value of the designated column from the current row as a float. |
int |
getInt(int columnIndex)
Get the value of the designated column from the current row as an int. |
int |
getInt(java.lang.String columnToken)
Get the value of the designated column from the current row as an int. |
long |
getLong(int columnIndex)
Get the value of the designated column from the current row as a long. |
long |
getLong(java.lang.String columnToken)
Get the value of the designated column from the current row as a long. |
TWGDbResultSetMetaData |
getMetaData()
Get a TWGDbResultSetMetaData object which contains information about the columns in the result set. |
protected int |
getMetaDataBufferLen()
Get the length of the buffer required for the column information This method should be called only in the Director server engine. |
protected static java.lang.String |
getMyClassName(java.lang.Object objectVariable)
The class method gets the class name of an object. |
int |
getNumOfRows()
Gets the total number of the rows in the TWGDbResultSet object. |
java.lang.Object |
getObject(int columnIndex)
Get the value of the designated column from the current row as an Object. |
java.lang.Object |
getObject(java.lang.String columnToken)
Get the value of the designated column from the current row as an Object. |
int |
getPosition()
Return the current row pointer. |
java.lang.Long |
getQueryId()
Get the persistent object id of the query that was run |
TWGDbRow |
getRow(int rowNumber)
Get a referenece to a TWGDbRow object. |
protected int |
getRowBufferLen()
Get the length of the buffer required for the header and row data. |
short |
getShort(int columnIndex)
Get the value of the designated column from the current row as a short. |
short |
getShort(java.lang.String columnToken)
Get the value of the designated column from the current row as a short. |
java.lang.String |
getString(int columnIndex)
Get the value of the designated column from the current row as a String object. |
java.lang.String |
getString(java.lang.String columnToken)
Get the value of the designated column from the current row as a String object. |
boolean |
next()
Increment to the next row |
protected void |
setBufferParms(byte[] rowBuf,
byte[] columnBuf)
Method to write out information into two buffers. |
protected void |
setBufferParms(Command cmd)
Build IntelByteBuffer parms version of the result set and add it to the IPC command |
void |
setPosition(int rowNum)
Set the current row pointer to a specific row. |
protected void |
setQueryId(long qId)
The instance method sets the id of the query from which the result set * was derived from. |
protected void |
setQueryId(java.lang.Long qId)
The instance method sets the id of the query from which the result set * was derived from. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public TWGDbResultSet(java.lang.Long qId)
qId
- - the persistent object id for the querypublic TWGDbResultSet(long qId)
qId
- - the persistent object id for the querypublic TWGDbResultSet()
public TWGDbResultSet(byte[] rowBuf, byte[] columnBuf) throws TWGDbException
Constructor for TWGDbResultSet that uses an intel byte buffer formats of the row and column data as input.
rowBuf
- - the row information in intel Byte buffer formatcolumnBuf
- - the column information in intel Byte buffer formatpublic TWGDbResultSet(Command cmd) throws TWGDbException
Constructor for TWGDbResultSet an IPC command whose input parameter is the an intel byte buffer format for the result set row and column data as input.
TWGDbException
- thrown for parameter or version errors.Method Detail |
protected static java.lang.String getMyClassName(java.lang.Object objectVariable)
objectVariable
- - reference to an object
protected void addRow(TWGDbRow value)
value
- - a TWGDbRow object reference *protected void addColumnMetaData(java.lang.String table_column, int columnId, TWGDbQueryColumn columnMeta)
table_column
- - a column full name * *columnMeta
- - a TWGDbQueryColumn object reference **
protected void addColumnMetaData(java.lang.String table_column, java.lang.String columnName, int columnId, TWGDbQueryColumn columnMeta)
table_column
- - a column full name *columnName
- - a column token name *columnMeta
- - a TWGDbQueryColumn object reference **
public TWGDbResultSetMetaData getMetaData()
TWGDbResultSetMetaData
public boolean next()
public int getColumnCount()
public int getPosition()
public void setPosition(int rowNum)
rowNum
- - row numberpublic int getNumOfRows()
public TWGDbRow getRow(int rowNumber) throws TWGDbNoMoreRowException
rowNumber
- the number of the requested row
TWGDbException
TWGDbNoMoreRowException
protected void setQueryId(java.lang.Long qId)
qId
- - the persistent object id for the query
*protected void setQueryId(long qId)
qId
- - the persistent object id for the query
*public java.lang.Long getQueryId()
public Vect getColumns()
public int[] getColumnTypes() throws TWGDbException
TWGDbException
public java.lang.String getString(int columnIndex) throws TWGDbNoMoreRowException
columnIndex
- - column number *
TWGDbNoMoreRowException
public java.lang.String getString(java.lang.String columnToken) throws TWGDbColumnNotFoundException, TWGDbNoMoreRowException
columnToken
- - column name - column token name or the
fully qualified table_token_name.column_token_name
TWGDbColumnNotFoundException
TWGDbNoMoreRowException
public int getInt(int columnIndex) throws TWGDbNoMoreRowException, TWGDbException
columnIndex
- - column number *
TWGDbException
- *
TWGDbNoMoreRowException
public int getInt(java.lang.String columnToken) throws TWGDbColumnNotFoundException, TWGDbNoMoreRowException, TWGDbException
columnToken
- - column name - column token name or the
fully qualified table_token_name.column_token_name
TWGDbException
- *
TWGDbColumnNotFoundException
TWGDbNoMoreRowException
public short getShort(int columnIndex) throws TWGDbNoMoreRowException
columnIndex
- - column number *
TWGDbException
- *
TWGDbNoMoreRowException
public short getShort(java.lang.String columnToken) throws TWGDbColumnNotFoundException, TWGDbNoMoreRowException
TWGDbException
- *
TWGDbColumnNotFoundException
TWGDbNoMoreRowException
public float getFloat(int columnIndex) throws TWGDbNoMoreRowException
columnIndex
- - column number *
TWGDbException
- *
TWGDbNoMoreRowException
public float getFloat(java.lang.String columnToken) throws TWGDbColumnNotFoundException, TWGDbNoMoreRowException
TWGDbException
- *
TWGDbColumnNotFoundException
TWGDbNoMoreRowException
public double getDouble(int columnIndex) throws TWGDbNoMoreRowException
columnIndex
- - column number *
TWGDbException
- *
TWGDbNoMoreRowException
public double getDouble(java.lang.String columnToken) throws TWGDbColumnNotFoundException, TWGDbNoMoreRowException
columnToken
- - column name - column token name or the
fully qualified table_token_name.column_token_name
TWGDbException
- *
TWGDbColumnNotFoundException
TWGDbNoMoreRowException
public long getLong(int columnIndex) throws TWGDbNoMoreRowException
columnIndex
- - column number *
TWGDbException
- *
TWGDbNoMoreRowException
public long getLong(java.lang.String columnToken) throws TWGDbColumnNotFoundException, TWGDbNoMoreRowException
columnToken
- - column name - column token name or the
fully qualified table_token_name.column_token_name
TWGDbException
- *
TWGDbColumnNotFoundException
TWGDbNoMoreRowException
public java.lang.Object getObject(int columnIndex) throws TWGDbNoMoreRowException
columnIndex
- - column number *
TWGDbException
- *
TWGDbNoMoreRowException
public java.lang.Object getObject(java.lang.String columnToken) throws TWGDbColumnNotFoundException, TWGDbNoMoreRowException
columnToken
- - column name - column token name or the
fully qualified table_token_name.column_token_name
TWGDbException
- *
TWGDbColumnNotFoundException
TWGDbNoMoreRowException
public int getColumnId(java.lang.String columnToken) throws TWGDbColumnNotFoundException
columnToken
- - column token name
TWGDbColumnNotFoundException
protected void setBufferParms(byte[] rowBuf, byte[] columnBuf) throws TWGDbException
This method should be called only in the Director server engine.
columnBuf
- - conatining information about meta data.
TWGDbException
protected void setBufferParms(Command cmd) throws TWGDbException
This method should be called only in the Director server engine.
cmd
- - the IPC command whose input parameters will be set by this method
-
- TWGDbException thrown for parameter or version errors
TWGDbException
protected int getRowBufferLen() throws TWGDbNoMoreRowException
This method should be called only in the Director server engine.
TWGDbNoMoreRowException
protected int getMetaDataBufferLen() throws TWGDbException
TWGDbException
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |