public class JdbcData extends AbstractDataSource
Constructor and Description |
---|
JdbcData(java.sql.Connection connection,
java.lang.String table)
Initializes a new buffered instance to query the data from a specified
table using a specified JDBC connection.
|
JdbcData(java.sql.Connection connection,
java.lang.String table,
boolean buffered)
Initializes a new instance to query the data from a specified table
using a specified JDBC connection.
|
Modifier and Type | Method and Description |
---|---|
java.lang.Comparable<?> |
get(int col,
int row)
Returns the row with the specified index.
|
int |
getColumnCount()
Returns the number of columns of the data source.
|
int |
getRowCount()
Returns the number of rows of the data source.
|
boolean |
isBuffered()
Returns whether this data source is buffered.
|
void |
setBuffered(boolean buffered)
Determines whether this data source should buffer intermediate results.
|
addDataListener, getColumn, getColumnTypes, getRow, getStatistics, isColumnNumeric, iterator, notifyDataAdded, notifyDataRemoved, notifyDataUpdated, removeDataListener, setColumnTypes
public JdbcData(java.sql.Connection connection, java.lang.String table, boolean buffered)
connection
- JDBC connection object.table
- Properly quoted name of the table.buffered
- Turns on buffering of JDBC queries.public JdbcData(java.sql.Connection connection, java.lang.String table)
connection
- JDBC connection object.table
- Properly quoted name of the table.public java.lang.Comparable<?> get(int col, int row)
col
- index of the column to returnrow
- index of the row to returnpublic int getColumnCount()
AbstractDataSource
getColumnCount
in interface DataSource
getColumnCount
in class AbstractDataSource
public int getRowCount()
public boolean isBuffered()
true
when this object uses buffering,
false
otherwisepublic void setBuffered(boolean buffered)
buffered
- true
when this object should use buffering,
false
otherwise