|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object | +--kotkabeans.RS2
Stores ResultSet's data. Database connection must be open for initializing this bean.
RSMetaData| Field Summary | |
protected int |
count
Number of rows. |
protected int |
currentRow
|
protected java.lang.String |
name
|
protected java.lang.Object[][] |
rows
|
protected RSMetaData |
rsmd
Stores ResultSet's metadata as in ResultSetMetaData. |
protected boolean |
sqlNull
Whether the last column read has value of SQL null |
| Constructor Summary | |
RS2()
Dummy empty constructor. |
|
RS2(java.sql.ResultSet rs)
|
|
RS2(java.sql.ResultSet rs,
boolean log)
|
|
RS2(java.sql.ResultSet rs,
java.lang.String name)
|
|
RS2(java.sql.ResultSet rs,
java.lang.String name,
boolean log)
|
|
RS2(java.lang.String name,
java.sql.ResultSet rs)
Constructor with ResultSet as parameter. |
|
RS2(java.lang.String name,
java.sql.ResultSet rs,
boolean log)
|
|
| Method Summary | |
void |
addRs(java.sql.ResultSet rs)
Add another rs to the end of current records. |
void |
afterLast()
Moves the cursor to one after the last row in this RSContainer object. |
void |
beforeFirst()
Moves the cursor to one before the first row in this RSContainer object. |
void |
close()
|
int |
count()
|
void |
first()
Moves the cursor to the first row in this RSContainer object. |
java.sql.Array |
getArray(int colIndex)
Retrieves the value of the wanted column in the current row of this RSContainer object as an Array object in the Java programming language. |
java.sql.Array |
getArray(java.lang.String colName)
Retrieves the value of the wanted column in the current row of this RSContainer object as an Array object in the Java programming language. |
boolean |
getBoolean(int colIndex)
Retrieves the value of the wanted column in the current row of this RSContainer object as a boolean in the Java programming language. |
boolean |
getBoolean(java.lang.String colName)
Retrieves the value of the wanted column in the current row of this RSContainer object as a boolean in the Java programming language. |
int |
getColumnCount()
Retrieve number of columns in this RS2. |
double |
getDouble(int colIndex)
Retrieves the value of the wanted column in the current row of this RSContainer object as a double in the Java programming language. |
double |
getDouble(java.lang.String colName)
Retrieves the value of the wanted column in the current row of this RSContainer object as a double in the Java programming language. |
float |
getFloat(int colIndex)
Retrieves the value of the wanted column in the current row of this RSContainer object as a float in the Java programming language. |
float |
getFloat(java.lang.String colName)
Retrieves the value of the wanted column in the current row of this RSContainer object as a float in the Java programming language. |
int |
getInt(int colIndex)
Retrieves the value of the wanted column in the current row of this RSContainer object as an int in the Java programming language. |
int |
getInt(java.lang.String colName)
Retrieves the value of the wanted column in the current row of this RSContainer object as an int in the Java programming language. |
long |
getLong(int colIndex)
Retrieves the value of the wanted column in the current row of this RSContainer object as a long in the Java programming language. |
long |
getLong(java.lang.String colName)
Retrieves the value of the wanted column in the current row of this RSContainer object as a long in the Java programming language. |
RSMetaData |
getMetaData()
Retrieves the number, types and properties of this RSContainer object's columns. |
java.lang.Object |
getObject(int colIndex)
Retrieves the value of the wanted column in the current row of this RSContainer object as a short in the Java programming language. |
java.lang.Object |
getObject(java.lang.String colName)
Retrieves the value of the wanted column in the current row of this RSContainer object as an Object in the Java programming language. |
int |
getRow()
Finds the column index of the given column name. |
java.lang.String |
getString(int colIndex)
Retrieves the value of the wanted column in the current row of this RSContainer object as an String in the Java programming language. |
java.lang.String |
getString(java.lang.String colName)
Retrieves the value of the wanted column in the current row of this RSContainer object as an String in the Java programming language. |
boolean |
isAfterLast()
Retrieves whether the cursor is after the last row in this RSContainer object. |
boolean |
isBeforeFirst()
Retrieves whether the cursor is before the first row in this RSContainer object. |
boolean |
isFirst()
Retrieves whether the cursor is on the first row of this RSContainer object. |
boolean |
isLast()
Retrieves whether the cursor is on the last row of this RSContainer object. |
void |
last()
Moves the cursor to the last row in this RSContainer object. |
boolean |
next()
Retrieves the value of the wanted column in the current row of this RSContainer object as an java.sql.Time in the Java programming language. |
boolean |
previous()
Moves the cursor to the previous row in this RSContainer object. |
int |
size()
Retrieve number of rows in this RS2. |
void |
sortArray(int field)
Implements self-constructed mergesort for 2-dim array |
boolean |
wasNull()
Reports whether the last column read had a value of SQL NULL. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
protected RSMetaData rsmd
protected int count
protected java.lang.Object[][] rows
protected int currentRow
protected boolean sqlNull
SQL null
protected java.lang.String name
| Constructor Detail |
public RS2()
public RS2(java.sql.ResultSet rs)
public RS2(java.sql.ResultSet rs,
boolean log)
public RS2(java.lang.String name,
java.sql.ResultSet rs)
rs - ResultSet to read
java.sql.SQLException - if something fails reading ResultSet object
public RS2(java.lang.String name,
java.sql.ResultSet rs,
boolean log)
public RS2(java.sql.ResultSet rs,
java.lang.String name)
public RS2(java.sql.ResultSet rs,
java.lang.String name,
boolean log)
| Method Detail |
public void addRs(java.sql.ResultSet rs)
public void sortArray(int field)
public RSMetaData getMetaData()
public int size()
public int count()
public int getColumnCount()
public int getRow()
java.lang.Exception - if the RSContainer object does not contain colName
public abstract int findColumn(String colName) throws Exception;
/**
Retrieves the current row number. The first row is number 1, the second number 2, and so on.
public java.sql.Array getArray(int colIndex)
throws java.lang.ClassCastException
RSContainer object as an Array object in the Java programming language.
colIndex - the first column is 1, the second is 2, ...
java.lang.ClassCastException
public java.sql.Array getArray(java.lang.String colName)
throws java.lang.Exception
RSContainer object as an Array object in the Java programming language.
colName - the name of the column from which to retrieve the value
java.lang.Exception
public boolean getBoolean(int colIndex)
throws java.lang.Exception
RSContainer object as a boolean in the Java programming language.
colIndex - the first column is 1, the second is 2, ...
java.lang.Exception
public boolean getBoolean(java.lang.String colName)
throws java.lang.Exception
RSContainer object as a boolean in the Java programming language.
colName - the name of the column from which to retrieve the value
java.lang.Exception
public double getDouble(int colIndex)
throws java.lang.ClassCastException
RSContainer object as a double in the Java programming language.
colIndex - the first column is 1, the second is 2, ...
java.lang.ClassCastException
public double getDouble(java.lang.String colName)
throws java.lang.Exception
RSContainer object as a double in the Java programming language.
colName - the name of the column from which to retrieve the value
java.lang.Exception
public float getFloat(int colIndex)
throws java.lang.ClassCastException
RSContainer object as a float in the Java programming language.
colIndex - the first column is 1, the second is 2, ...
java.lang.ClassCastException
public float getFloat(java.lang.String colName)
throws java.lang.Exception
RSContainer object as a float in the Java programming language.
colName - the name of the column from which to retrieve the value
java.lang.Exception
public int getInt(int colIndex)
throws java.lang.ClassCastException
RSContainer object as an int in the Java programming language.
colIndex - the first column is 1, the second is 2, ...
java.lang.ClassCastException
public int getInt(java.lang.String colName)
throws java.lang.Exception
RSContainer object as an int in the Java programming language.
colName - the name of the column from which to retrieve the value
java.lang.Exception
public long getLong(int colIndex)
throws java.lang.ClassCastException
RSContainer object as a long in the Java programming language.
colIndex - the first column is 1, the second is 2, ...
java.lang.ClassCastException
public long getLong(java.lang.String colName)
throws java.lang.Exception
RSContainer object as a long in the Java programming language.
colName - the name of the column from which to retrieve the value
java.lang.Exceptionpublic java.lang.Object getObject(int colIndex)
RSContainer object as a short in the Java programming language.
colIndex - the first column is 1, the second is 2, ...
RSContainer object as a short in the Java programming language.
public java.lang.Object getObject(java.lang.String colName)
throws java.lang.Exception
RSContainer object as an Object in the Java programming language.
colName - the name of the column from which to retrieve the value
java.lang.Exceptionpublic java.lang.String getString(int colIndex)
RSContainer object as an String in the Java programming language.
colIndex - the first column is 1, the second is 2, ...
public java.lang.String getString(java.lang.String colName)
throws java.lang.Exception
RSContainer object as an String in the Java programming language.
colName - the name of the column from which to retrieve the value
java.lang.Exceptionpublic boolean next()
RSContainer object as an java.sql.Time in the Java programming language.
RSContainer object as an java.sql.Time in the Java programming language.public boolean previous()
RSContainer object.
public boolean wasNull()
SQL NULL.
public boolean isFirst()
RSContainer object.
public boolean isLast()
RSContainer object.
public boolean isBeforeFirst()
RSContainer object.
public boolean isAfterLast()
RSContainer object.
public void first()
RSContainer object.
public void last()
RSContainer object.
public void beforeFirst()
RSContainer object.
public void afterLast()
RSContainer object.
public void close()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||