com.ibm.redback.redbeans
Class RecordSet

java.lang.Object
  |
  +--com.ibm.redback.redbeans.RecordSet

public class RecordSet
extends java.lang.Object

This class is used to create a uQuery object. Once created, selects, next page, previous page, etc. can be requested from the instance. If requested, this instance will take care of a lookup automatically, displaying the contents in a lookup frame.


Constructor Summary
RecordSet(RedObject obj)
          holds a RedObject for communication to RBO server
 
Method Summary
 int getAbsolutePage()
          Gets the current page number
 int getAbsolutePosition()
          Gets the current row position
 java.util.Vector getColumns()
          returns vector of column names if in RPC Mode
protected  java.lang.String getHiddenField(java.lang.String fldName)
           
 java.lang.String getHidFields()
          Get non-null hidden-field values and return as a string in the format 'name=value&name=value ..etc'
 int getMaxPages()
           
 java.util.Hashtable getMonitorData()
          Gets the content of of the monitor property/value data repository.
 int getNumItems()
          Gets the count of number of items selected.
 int getPageSize()
          Gets the no of items per page .
 java.lang.String getProperty(java.lang.String propertyName)
          Gets the field name for current row.
 java.util.Vector getPropertyNames()
          Gets the property names.
 int getRelativePosition()
          Gets the current row position relative to the current page
 java.lang.String getRow()
          Gets the dada for the selected row.
 java.util.Vector getRPCRow()
           
 boolean isBOF()
          Returns boolean value depending on begining of the record set.
 boolean isEOF()
          Returns boolean value depending on end of the record set.
 boolean isMonitorOn()
          Gets current status of monitor flag.
 void move(int pos)
          moves row number (cursor) to specified position.
 void moveFirst()
          moves the current row position to 1
 void moveLast()
          moves the current row position to the last row
 void moveNext()
          moves row number (cursor) forward 1.
 boolean moveNextPage()
          Moves this RecordSet to the next page
 void movePrevious()
          moves row number (cursor) back 1.
 boolean movePrevPage()
          Moves this RecordSet to the previous page
 void refresh(java.lang.String objHandle)
          Refreshes state from RBO Server and sets data to page one, you can then use the move(int pos) method to set row number as required
 void setAbsolutePage(int pageNumber)
          gets a specific page and also sets row number and relative row number
 void setAllPropertyNames()
          Sets all the Property Names.by detting display fielads.
 void setAllRPCValues(java.lang.String serverReply)
          Sets RPC values.
 void setHidFields(java.lang.String serverReply)
          Set all Hidden-fields from server reply
 void setMonitorOn(boolean flag)
          Sets the performance monitor.
 void setProperty(java.lang.String propertyName, java.lang.String value)
          Set current value for a given property name.
 java.lang.String URLDecode(java.lang.String str)
          This method decodes the given urlencoded string.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RecordSet

public RecordSet(RedObject obj)
holds a RedObject for communication to RBO server
Method Detail

isBOF

public boolean isBOF()
Returns boolean value depending on begining of the record set.

isEOF

public boolean isEOF()
Returns boolean value depending on end of the record set.

moveFirst

public void moveFirst()
moves the current row position to 1

moveLast

public void moveLast()
moves the current row position to the last row

moveNext

public void moveNext()
moves row number (cursor) forward 1. If past last row isEOF() will return true If another page is required will request that page

move

public void move(int pos)
moves row number (cursor) to specified position. If past last row will set EOF to true, if before row 1 will set BOF to true If another page is required will request that page
Should the row requested be greater than the amount of rows then the page number will be set to the last page plus one and the row number will be set to the last row plus one.
Parameters:
pos - the row number position

getColumns

public java.util.Vector getColumns()
returns vector of column names if in RPC Mode

movePrevious

public void movePrevious()
moves row number (cursor) back 1. If past initial row will set BOF to true If another page is required will request that page

getNumItems

public int getNumItems()
Gets the count of number of items selected.

getAbsolutePosition

public int getAbsolutePosition()
Gets the current row position

getAbsolutePage

public int getAbsolutePage()
Gets the current page number

moveNextPage

public boolean moveNextPage()
Moves this RecordSet to the next page

movePrevPage

public boolean movePrevPage()
Moves this RecordSet to the previous page

getMaxPages

public int getMaxPages()

getPageSize

public int getPageSize()
Gets the no of items per page .

getPropertyNames

public java.util.Vector getPropertyNames()
Gets the property names. .

getProperty

public java.lang.String getProperty(java.lang.String propertyName)
Gets the field name for current row.
Parameters:
propertyName - the field name to return for the current row

getHidFields

public java.lang.String getHidFields()
Get non-null hidden-field values and return as a string in the format 'name=value&name=value ..etc'

setMonitorOn

public void setMonitorOn(boolean flag)
Sets the performance monitor.
Parameters:
flag - to specify whether or not the performance monitor should be switched on/off

isMonitorOn

public boolean isMonitorOn()
Gets current status of monitor flag.

setAbsolutePage

public void setAbsolutePage(int pageNumber)
gets a specific page and also sets row number and relative row number
Parameters:
pageNumber - the page number required

setHidFields

public void setHidFields(java.lang.String serverReply)
Set all Hidden-fields from server reply
Parameters:
serverReply - the reply string from RBO server

getMonitorData

public java.util.Hashtable getMonitorData()
Gets the content of of the monitor property/value data repository.

getHiddenField

protected java.lang.String getHiddenField(java.lang.String fldName)
Parameters:
fldName - the name of the hidden field

URLDecode

public java.lang.String URLDecode(java.lang.String str)
                           throws RbException
This method decodes the given urlencoded string.
Parameters:
str - the url-encoded string

getRow

public java.lang.String getRow()
                        throws RbException
Gets the dada for the selected row.
Parameters:
rowNo - the row number to return - starts from 1
Throws:
RbException - thrown if at EOF or BOF or cannot decode resultant string

getRPCRow

public java.util.Vector getRPCRow()

getRelativePosition

public int getRelativePosition()
Gets the current row position relative to the current page

refresh

public void refresh(java.lang.String objHandle)
Refreshes state from RBO Server and sets data to page one, you can then use the move(int pos) method to set row number as required
Parameters:
objHandle - which would have been preserved from the RedObject RBOHandle

setAllRPCValues

public void setAllRPCValues(java.lang.String serverReply)
Sets RPC values.
Parameters:
serverReply -  

setAllPropertyNames

public void setAllPropertyNames()
Sets all the Property Names.by detting display fielads.

setProperty

public void setProperty(java.lang.String propertyName,
                        java.lang.String value)
Set current value for a given property name.
Parameters:
propertyName - relates to a property defined in the RBO
value - the current value of the property