com.dynalivery.dor
Interface DORDataSet

All Known Implementing Classes:
DORSQLResultSetAdapter

public interface DORDataSet

This interface is a Parallel Crystal centric interface which all other interfaces should be converted to by using an adapter class such as DORSQLResultSetAdapter. This interface contains the Parallel Crystal data types as constants.


Field Summary
static int BLOB
           
static int BOOLEAN
           
static int BYTE
           
static int CURRENCY
           
static int DATE
           
static int DOUBLE
           
static int INTEGER
           
static int MEMO
           
static int SHORT
           
static int STRING
           
 
Method Summary
 void close()
          This method is called by Parallel Crystal after the data object has been used.
 java.io.InputStream getBlob(int colNum)
          Called if the data type is DORDataSet.BLOB to get the value of the field.
 boolean getBoolean(int colNum)
          Called if the data type is DORDataSet.BOOLEAN to get the value of the field.
 byte getByte(int colNum)
          Called if the data type is DORDataSet.BYTE to get the value of the field.
 int getColumnCount()
          Called to determine the number of columns in the data object.
 int getColumnDisplaySize(int colNum)
          Called for string data types to get the maximum number of characters in the field.
 java.lang.String getColumnLabel(int colNum)
          Called to get the name of the field.
 int getColumnType(int colNum)
          This method should provide the DORDataSet type of the field.
 double getCurrency(int colNum)
          Called if the data type is DORDataSet.CURRENCY to get the value of the field.
 java.util.Date getDate(int colNum)
          Called if the data type is DORDataSet.DATE to get the value of the field.
 double getDouble(int colNum)
          Called if the data type is DORDataSet.DOUBLE to get the value of the field.
 int getInteger(int colNum)
          Called if the data type is DORDataSet.INTEGER to get the value of the field.
 java.lang.String getMemo(int colNum)
          Called if the data type is DORDataSet.MEMO to get the value of the field.
 short getShort(int colNum)
          Called if the data type is DORDataSet.SHORT to get the value of the field.
 java.lang.String getString(int colNum)
          Called if the data type is DORDataSet.STRING to get the value of the field.
 boolean next()
          This method should advance the row pointer of the data object.
 

Field Detail

CURRENCY

public static final int CURRENCY

BOOLEAN

public static final int BOOLEAN

STRING

public static final int STRING

DATE

public static final int DATE

DOUBLE

public static final int DOUBLE

INTEGER

public static final int INTEGER

BLOB

public static final int BLOB

SHORT

public static final int SHORT

BYTE

public static final int BYTE

MEMO

public static final int MEMO
Method Detail

close

public void close()
           throws DORException
This method is called by Parallel Crystal after the data object has been used.

getBlob

public java.io.InputStream getBlob(int colNum)
                            throws DORException
Called if the data type is DORDataSet.BLOB to get the value of the field.
Parameters:
colNum - int

getBoolean

public boolean getBoolean(int colNum)
                   throws DORException
Called if the data type is DORDataSet.BOOLEAN to get the value of the field.
Parameters:
colNum - int

getByte

public byte getByte(int colNum)
             throws DORException
Called if the data type is DORDataSet.BYTE to get the value of the field.
Parameters:
colNum - int

getColumnCount

public int getColumnCount()
                   throws DORException
Called to determine the number of columns in the data object.
Parameters:
colNum - int

getColumnDisplaySize

public int getColumnDisplaySize(int colNum)
                         throws DORException
Called for string data types to get the maximum number of characters in the field. If the value is greater than 255, then the field is mapped to a Crystal memo data type to prevent loss of data due to Crystal's string data type's 255 character limitation.
Parameters:
colNum - int

getColumnLabel

public java.lang.String getColumnLabel(int colNum)
                                throws DORException
Called to get the name of the field.
Parameters:
colNum - int

getColumnType

public int getColumnType(int colNum)
                  throws DORException
This method should provide the DORDataSet type of the field. For example, DORDataSet.STRING. It is up to the creator of the data object to return a value which will then result in a successful call using the getXXX method of that type. For example, a field which has textual data and has a maximum length of greater than 255 characters should be mapped to the DORDataSet.MEMO type.
Parameters:
colNum - int

getCurrency

public double getCurrency(int colNum)
                   throws DORException
Called if the data type is DORDataSet.CURRENCY to get the value of the field.
Parameters:
colNum - int

getDate

public java.util.Date getDate(int colNum)
                       throws DORException
Called if the data type is DORDataSet.DATE to get the value of the field.
Parameters:
colNum - int

getDouble

public double getDouble(int colNum)
                 throws DORException
Called if the data type is DORDataSet.DOUBLE to get the value of the field.
Parameters:
colNum - int

getInteger

public int getInteger(int colNum)
               throws DORException
Called if the data type is DORDataSet.INTEGER to get the value of the field.
Parameters:
colNum - int

getMemo

public java.lang.String getMemo(int colNum)
                         throws DORException
Called if the data type is DORDataSet.MEMO to get the value of the field.
Parameters:
colNum - int

getShort

public short getShort(int colNum)
               throws DORException
Called if the data type is DORDataSet.SHORT to get the value of the field.
Parameters:
colNum - int

getString

public java.lang.String getString(int colNum)
                           throws DORException
Called if the data type is DORDataSet.STRING to get the value of the field.
Parameters:
colNum - int

next

public boolean next()
             throws DORException
This method should advance the row pointer of the data object. Parallel Crystal assumes that the row pointer initially points before the first row and will call this method before examining each row of the data object. The method should return false if there are no more rows in the data object. Note that since there is only a next method and no previous method, the data object must only support forward cursor movement.
Parameters:
colNum - int
Returns:
boolean true if data pointer moved to next row, false if already at last row