jet.server.api.db
Interface Recordset


public interface Recordset

A Recordset is a set of records.


Field Summary
static int CACHED
          The constant indicating that a recordset is not connected to JDBC.
static int LINKED
          The constant indicating that a recordset is connected to JDBC.
 
Method Summary
 void close()
          Closes the record set.
 int columns()
          Returns the amount of all columns in a record.
 void delete()
          Deletes the current record.
 FieldValue[] fields()
          Gets FieldValue array of a record.
 FieldValue fields(int index)
          Gets FieldValue indicated by an index.
 FieldValue fields(java.lang.String fdName)
          Gets FieldValue indicated by a field name.
 boolean first()
          Cursor moves to the first record.
 boolean getBoolean(int index)
          Retrieves the value of the designated field in the current row of this ResultSet object as a boolean in the Java programming language.
 boolean getBoolean(java.lang.String fdName)
          Retrieves the value of the designated field in the current row of this ResultSet object as a boolean in the Java programming language.
 byte getByte(int index)
          Retrieves the value of the designated field in the current row of this ResultSet object as a byte in the Java programming language.
 byte getByte(java.lang.String fdName)
          Retrieves the value of the designated field in the current row of this ResultSet object as a byte in the Java programming language.
 byte[] getBytes(int index)
          Retrieves the value of the designated field in the current row of this ResultSet object as a byte[] in the Java programming language.
 byte[] getBytes(java.lang.String fdName)
          Retrieves the value of the designated field in the current row of this ResultSet object as a byte[] in the Java programming language.
 java.sql.Date getDate(int index)
          Retrieves the value of the designated field in the current row of this ResultSet object as a java.sql.Date in the Java programming language.
 java.sql.Date getDate(java.lang.String fdName)
          Retrieves the value of the designated field in the current row of this ResultSet object as a java.sql.Date in the Java programming language.
 double getDouble(int index)
          Retrieves the value of the designated field in the current row of this ResultSet object as a double in the Java programming language.
 double getDouble(java.lang.String fdName)
          Retrieves the value of the designated field in the current row of this ResultSet object as a double in the Java programming language.
 float getFloat(int index)
          Retrieves the value of the designated field in the current row of this ResultSet object as a float in the Java programming language.
 float getFloat(java.lang.String fdName)
          Retrieves the value of the designated field in the current row of this ResultSet object as a float in the Java programming language.
 int getInt(int index)
          Retrieves the value of the designated field in the current row of this ResultSet object as a int in the Java programming language.
 int getInt(java.lang.String fdName)
          Retrieves the value of the designated field in the current row of this ResultSet object as a int in the Java programming language.
 long getLong(int index)
          Retrieves the value of the designated field in the current row of this ResultSet object as a long in the Java programming language.
 long getLong(java.lang.String fdName)
          Retrieves the value of the designated field in the current row of this ResultSet object as a long in the Java programming language.
 int getSetType()
          Returns the type of the Recordset, which should be one of jet.server.api.db.Recordset.LINKED or jet.server.api.db.Recordset.CACHED.
 short getShort(int index)
          Retrieves the value of the designated field in the current row of this ResultSet object as a short in the Java programming language.
 short getShort(java.lang.String fdName)
          Retrieves the value of the designated field in the current row of this ResultSet object as a short in the Java programming language.
 java.lang.String getString(int index)
          Retrieves the value of the designated field in the current row of this ResultSet object as a String in the Java programming language.
 java.lang.String getString(java.lang.String fdName)
          Retrieves the value of the designated field in the current row of this ResultSet object as a String in the Java programming language.
 java.sql.Time getTime(int index)
          Retrieves the value of the designated field in the current row of this ResultSet object as a Time in the Java programming language.
 java.sql.Time getTime(java.lang.String fdName)
          Retrieves the value of the designated field in the current row of this ResultSet object as a Time in the Java programming language.
 java.sql.Timestamp getTimestamp(int index)
          Retrieves the value of the designated field in the current row of this ResultSet object as a Timestamp in the Java programming language.
 java.sql.Timestamp getTimestamp(java.lang.String fdName)
          Retrieves the value of the designated field in the current row of this ResultSet object as a Timestamp in the Java programming language.
 java.lang.Object getValue(int index)
          Gets the value of the specified field by the field index.
 java.lang.Object getValue(java.lang.String fdName)
          Gets the value of the specified field by the field name.
 boolean next()
          Cursor moves to the next record from the current record.
 int rows()
          Returns the amount of all rows in this records set.
 

Field Detail

LINKED

static final int LINKED
The constant indicating that a recordset is connected to JDBC.

See Also:
Constant Field Values

CACHED

static final int CACHED
The constant indicating that a recordset is not connected to JDBC.

See Also:
Constant Field Values
Method Detail

getSetType

int getSetType()
Returns the type of the Recordset, which should be one of jet.server.api.db.Recordset.LINKED or jet.server.api.db.Recordset.CACHED.

Returns:
the type of the Recordset.

fields

FieldValue[] fields()
Gets FieldValue array of a record.

Returns:
FieldValue array of a record.

fields

FieldValue fields(int index)
Gets FieldValue indicated by an index.

Parameters:
index -
Returns:
the FieldValue.

fields

FieldValue fields(java.lang.String fdName)
Gets FieldValue indicated by a field name.

Parameters:
fdName - the field name
Returns:
FieldValue

rows

int rows()
Returns the amount of all rows in this records set.

Returns:
the amount of all rows in this records set.

columns

int columns()
Returns the amount of all columns in a record.

Returns:
the amount of all columns in a record.

first

boolean first()
Cursor moves to the first record.

Returns:
whether to move to the first record.

next

boolean next()
Cursor moves to the next record from the current record.

Returns:
whether to move to the next record from the current record.

delete

void delete()
Deletes the current record.


close

void close()
Closes the record set.


getValue

java.lang.Object getValue(int index)
Gets the value of the specified field by the field index.

Parameters:
index -
Returns:
the value of the specified field by the field index.

getValue

java.lang.Object getValue(java.lang.String fdName)
Gets the value of the specified field by the field name.

Parameters:
fdName -
Returns:
the value of the specified field by the field name.

getBoolean

boolean getBoolean(int index)
                   throws java.sql.SQLException
Retrieves the value of the designated field in the current row of this ResultSet object as a boolean in the Java programming language.

Parameters:
index - the index of the field.
Returns:
the field value
Throws:
SQLException - if the index is not valid or if a database access error occurs.

getBoolean

boolean getBoolean(java.lang.String fdName)
                   throws java.sql.SQLException
Retrieves the value of the designated field in the current row of this ResultSet object as a boolean in the Java programming language.

Parameters:
fdName - the field name of the field.
Returns:
the field value.
Throws:
SQLException - if the field name is not valid or if a database access error occurs.

getByte

byte getByte(int index)
             throws java.sql.SQLException
Retrieves the value of the designated field in the current row of this ResultSet object as a byte in the Java programming language.

Parameters:
index - the index of the field.
Returns:
the field value.
Throws:
SQLException - if the index is not valid or if a database access error occurs.

getByte

byte getByte(java.lang.String fdName)
             throws java.sql.SQLException
Retrieves the value of the designated field in the current row of this ResultSet object as a byte in the Java programming language.

Parameters:
fdName - the field name of the field.
Returns:
the field value.
Throws:
SQLException - if the index is not valid or if a database access error occurs.

getShort

short getShort(int index)
               throws java.sql.SQLException
Retrieves the value of the designated field in the current row of this ResultSet object as a short in the Java programming language.

Parameters:
index - the index of the field.
Returns:
the field value.
Throws:
SQLException - if the index is not valid or if a database access error occurs.

getShort

short getShort(java.lang.String fdName)
               throws java.sql.SQLException
Retrieves the value of the designated field in the current row of this ResultSet object as a short in the Java programming language.

Parameters:
fdName - the field name of the field.
Returns:
the field value.
Throws:
SQLException - if the index is not valid or if a database access error occurs.

getInt

int getInt(int index)
           throws java.sql.SQLException
Retrieves the value of the designated field in the current row of this ResultSet object as a int in the Java programming language.

Parameters:
index - the index of the field.
Returns:
the field value.
Throws:
SQLException - if the index is not valid or if a database access error occurs.

getInt

int getInt(java.lang.String fdName)
           throws java.sql.SQLException
Retrieves the value of the designated field in the current row of this ResultSet object as a int in the Java programming language.

Parameters:
fdName - the field name of the field.
Returns:
the field value.
Throws:
SQLException - if the index is not valid or if a database access error occurs.

getLong

long getLong(int index)
             throws java.sql.SQLException
Retrieves the value of the designated field in the current row of this ResultSet object as a long in the Java programming language.

Parameters:
index - the index of the field.
Returns:
the field value.
Throws:
SQLException - if the index is not valid or if a database access error occurs.

getLong

long getLong(java.lang.String fdName)
             throws java.sql.SQLException
Retrieves the value of the designated field in the current row of this ResultSet object as a long in the Java programming language.

Parameters:
fdName - the field name of the field.
Returns:
the field value.
Throws:
SQLException - if the index is not valid or if a database access error occurs.

getFloat

float getFloat(int index)
               throws java.sql.SQLException
Retrieves the value of the designated field in the current row of this ResultSet object as a float in the Java programming language.

Parameters:
index - the index of the field.
Returns:
the field value.
Throws:
SQLException - if the index is not valid or if a database access error occurs.

getFloat

float getFloat(java.lang.String fdName)
               throws java.sql.SQLException
Retrieves the value of the designated field in the current row of this ResultSet object as a float in the Java programming language.

Parameters:
fdName - the field name of the field.
Returns:
the field value.
Throws:
SQLException - if the index is not valid or if a database access error occurs.

getDouble

double getDouble(int index)
                 throws java.sql.SQLException
Retrieves the value of the designated field in the current row of this ResultSet object as a double in the Java programming language.

Parameters:
index - the index of the field.
Returns:
the field value.
Throws:
SQLException - if the index is not valid or if a database access error occurs.

getDouble

double getDouble(java.lang.String fdName)
                 throws java.sql.SQLException
Retrieves the value of the designated field in the current row of this ResultSet object as a double in the Java programming language.

Parameters:
fdName - the field name of the field.
Returns:
the field value.
Throws:
SQLException - if the index is not valid or if a database access error occurs.

getString

java.lang.String getString(int index)
                           throws java.sql.SQLException
Retrieves the value of the designated field in the current row of this ResultSet object as a String in the Java programming language.

Parameters:
index - the index of the field.
Returns:
the field value.
Throws:
SQLException - if the index is not valid or if a database access error occurs.

getString

java.lang.String getString(java.lang.String fdName)
                           throws java.sql.SQLException
Retrieves the value of the designated field in the current row of this ResultSet object as a String in the Java programming language.

Parameters:
fdName - the field name of the field.
Returns:
the field value.
Throws:
SQLException - if the index is not valid or if a database access error occurs.

getBytes

byte[] getBytes(int index)
                throws java.sql.SQLException
Retrieves the value of the designated field in the current row of this ResultSet object as a byte[] in the Java programming language.

Parameters:
index - the index of the field.
Returns:
the field value.
Throws:
SQLException - if the index is not valid or if a database access error occurs.

getBytes

byte[] getBytes(java.lang.String fdName)
                throws java.sql.SQLException
Retrieves the value of the designated field in the current row of this ResultSet object as a byte[] in the Java programming language.

Parameters:
fdName - the field name of the field.
Returns:
the field value.
Throws:
SQLException - if the index is not valid or if a database access error occurs.

getDate

java.sql.Date getDate(int index)
                      throws java.sql.SQLException
Retrieves the value of the designated field in the current row of this ResultSet object as a java.sql.Date in the Java programming language.

Parameters:
index - the index of the field.
Returns:
the field value.
Throws:
SQLException - if the index is not valid or if a database access error occurs.

getDate

java.sql.Date getDate(java.lang.String fdName)
                      throws java.sql.SQLException
Retrieves the value of the designated field in the current row of this ResultSet object as a java.sql.Date in the Java programming language.

Parameters:
fdName - the field name of the field.
Returns:
the field value.
Throws:
SQLException - if the index is not valid or if a database access error occurs.

getTime

java.sql.Time getTime(int index)
                      throws java.sql.SQLException
Retrieves the value of the designated field in the current row of this ResultSet object as a Time in the Java programming language.

Parameters:
index - the index of the field.
Returns:
the field value.
Throws:
SQLException - if the index is not valid or if a database access error occurs.

getTime

java.sql.Time getTime(java.lang.String fdName)
                      throws java.sql.SQLException
Retrieves the value of the designated field in the current row of this ResultSet object as a Time in the Java programming language.

Parameters:
fdName - the field name of the field.
Returns:
the field value.
Throws:
SQLException - if the index is not valid or if a database access error occurs.

getTimestamp

java.sql.Timestamp getTimestamp(int index)
                                throws java.sql.SQLException
Retrieves the value of the designated field in the current row of this ResultSet object as a Timestamp in the Java programming language.

Parameters:
index - the index of the field.
Returns:
the field value.
Throws:
SQLException - if the index is not valid or if a database access error occurs.

getTimestamp

java.sql.Timestamp getTimestamp(java.lang.String fdName)
                                throws java.sql.SQLException
Retrieves the value of the designated field in the current row of this ResultSet object as a Timestamp in the Java programming language.

Parameters:
fdName - the field name of the field.
Returns:
the field value.
Throws:
SQLException - if the index is not valid or if a database access error occurs.