|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectweka.gui.sql.ResultSetHelper
public class ResultSetHelper
Represents an extended JTable, containing a table model based on a ResultSet and the corresponding query.
Constructor Summary | |
---|---|
ResultSetHelper(java.sql.ResultSet rs)
initializes the helper, with unlimited number of rows |
|
ResultSetHelper(java.sql.ResultSet rs,
int max)
initializes the helper, with the given maximum number of rows (less than 1 means unlimited) |
Method Summary | |
---|---|
java.lang.Object[][] |
getCells()
returns an 2-dimensional array with the content of the resultset, the first dimension is the row, the second the column (i.e., getCells()[y][x]). |
java.lang.Class[] |
getColumnClasses()
returns the classes for the columns |
int |
getColumnCount()
returns the number of columns in the resultset |
java.lang.String[] |
getColumnNames()
returns an array with the names of the columns in the resultset |
int |
getMaxRows()
the maximum number of rows to retrieve, less than 1 means unlimited |
boolean[] |
getNumericColumns()
returns an array that indicates whether a column is numeric or nor |
java.sql.ResultSet |
getResultSet()
the underlying resultset |
int |
getRowCount()
returns the number of rows in the resultset |
boolean |
hasMaxRows()
whether a limit on the rows to retrieve was set |
static boolean |
typeIsNumeric(int type)
returns whether the SQL type is numeric (and therefore the justification should be right) |
static java.lang.Class |
typeToClass(int type)
Returns the class associated with a SQL type. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ResultSetHelper(java.sql.ResultSet rs)
rs
- the resultset to work onpublic ResultSetHelper(java.sql.ResultSet rs, int max)
rs
- the resultset to work onmax
- the maximum number of rows to retrieveMethod Detail |
---|
public java.sql.ResultSet getResultSet()
public int getColumnCount()
public int getRowCount()
public java.lang.String[] getColumnNames()
public boolean[] getNumericColumns()
public java.lang.Class[] getColumnClasses()
public boolean hasMaxRows()
public int getMaxRows()
public java.lang.Object[][] getCells()
public static java.lang.Class typeToClass(int type)
type
- the SQL type
public static boolean typeIsNumeric(int type)
type
- the SQL type
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |