|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectedu.udo.cs.yale.example.DatabaseDataRow
public class DatabaseDataRow
Reads datarows from a data base.
Field Summary | |
---|---|
private java.sql.ResultSet |
resultSet
The result set which backs this data row. |
private int |
row
The current row of the result set. |
Constructor Summary | |
---|---|
DatabaseDataRow(java.sql.ResultSet resultSet)
Creates a data row from the given result set. |
Method Summary | |
---|---|
void |
ensureNumberOfColumns(int numberOfColumns)
Does nothing. |
private void |
ensureRowCorrect()
Ensures that the current row is the current row of the result set. |
double |
get(Attribute attribute)
Returns the desired data for the given attribute. |
static double |
readColumn(java.sql.ResultSet resultSet,
Attribute attribute)
Reads the data for the given attribute from the result set. |
void |
set(Attribute attribute,
double value)
Sets the given data for the given attribute. |
void |
trim()
Does nothing. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private java.sql.ResultSet resultSet
private int row
Constructor Detail |
---|
public DatabaseDataRow(java.sql.ResultSet resultSet) throws java.sql.SQLException
java.sql.SQLException
Method Detail |
---|
private void ensureRowCorrect() throws java.sql.SQLException
java.sql.SQLException
public double get(Attribute attribute)
get
in interface DataRow
public void set(Attribute attribute, double value)
set
in interface DataRow
public void ensureNumberOfColumns(int numberOfColumns)
ensureNumberOfColumns
in interface DataRow
public void trim()
trim
in interface DataRow
public static double readColumn(java.sql.ResultSet resultSet, Attribute attribute) throws java.sql.SQLException
java.sql.SQLException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |