public class JdbcData extends AbstractDataSource
Constructor and Description |
---|
JdbcData(Connection connection,
String table)
Initializes a new buffered instance to query the data from a specified
table using a specified JDBC connection.
|
JdbcData(Connection connection,
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 |
---|---|
Comparable<?> |
get(int col,
int row)
Returns the row with the specified index.
|
int |
getColumnCount()
Returns the number of columns of the data source.
|
Class<? extends Comparable<?>>[] |
getColumnTypes()
Returns the data types of all columns.
|
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, getRow, getStatistics, isColumnNumeric, iterator, notifyDataAdded, notifyDataRemoved, notifyDataUpdated, removeDataListener, setColumnTypes
public JdbcData(Connection connection, String table, boolean buffered)
connection
- JDBC connection object.table
- Properly quoted name of the table.buffered
- Turns on buffering of JDBC queries.public JdbcData(Connection connection, String table)
connection
- JDBC connection object.table
- Properly quoted name of the table.public 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 Class<? extends Comparable<?>>[] getColumnTypes()
AbstractDataSource
getColumnTypes
in interface DataSource
getColumnTypes
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
otherwiseCopyright © 2009-2013. All Rights Reserved.