|
JClass DesktopViews 6.3.0 API Documentation |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.klg.jclass.table.data.AbstractDataSource | +--com.klg.jclass.table.data.AbstractVectorDataSource | +--com.klg.jclass.table.data.JCVectorDataSource | +--com.klg.jclass.table.data.JCResultSetDataSource
This class is a simple read-only JDBC database source that retrieves a result set and stores it internally.
com.sun.java.util
class.TableDataModel
,
Serialized FormField Summary | |
protected int |
column_count
|
protected int[] |
column_type
|
protected Connection |
dbcon
|
protected String |
query
|
Fields inherited from class com.klg.jclass.table.data.JCVectorDataSource |
cells, column_labels, columns, is_moving, row_labels, rows |
Fields inherited from class com.klg.jclass.table.data.AbstractDataSource |
listeners |
Constructor Summary | |
JCResultSetDataSource()
Creates a new JCResultSetDataSource object. |
|
JCResultSetDataSource(Connection dbcon,
String query)
Creates new JCResultSetDataSource object given a Connection
object and query String. |
Method Summary | |
boolean |
connect(String driver,
String url,
Properties properties)
Establishes a connection to the data source. |
boolean |
executeQuery()
Executes the query and stores its results in a JCVector . |
int |
getColumnDatatype(int column)
Returns the table datatype for a column. |
int |
getColumnType(int column)
Returns the JDBC column type for a column. |
int[] |
getColumnTypes()
Returns an array of column types. |
Connection |
getConnection()
Returns a JDBC database connection. |
String |
getQuery()
Returns the SQL statement. |
void |
setConnection(Connection dbcon)
Sets the JDBC database connection. |
void |
setQuery(String query)
Sets the SQL statement. |
Methods inherited from class com.klg.jclass.table.data.JCVectorDataSource |
addColumn, addColumn, addRow, addRow, clearCells, deleteColumns, deleteColumns, deleteRows, deleteRows, getCells, getColumnLabels, getLabelValue, getNumColumns, getNumRows, getRowLabels, getTableColumnLabel, getTableDataItem, getTableRowLabel, isCell, isColumnLabel, isLabel, isRowLabel, isValidCell, isValidLabel, moveColumns, moveColumns, moveRows, moveRows, setCell, setCells, setCells, setColumnLabel, setColumnLabels, setColumnLabels, setDataChanged, setLabelValue, setNumColumns, setNumRows, setRowLabel, setRowLabels, setRowLabels |
Methods inherited from class com.klg.jclass.table.data.AbstractVectorDataSource |
createVector, createVector, createVector, createVector, createVector, removeElementsAt, setElementAt, strip |
Methods inherited from class com.klg.jclass.table.data.AbstractDataSource |
addTableDataListener, dispose, fireColumnChanged, fireColumnLabelChanged, fireColumnsAdded, fireColumnsDeleted, fireColumnsMoved, fireDataReset, fireNumColumnsChanged, fireNumRowsChanged, fireRowChanged, fireRowDeleted, fireRowLabelChanged, fireRowsAdded, fireRowsMoved, fireTableDataEvent, fireValueChanged, hasListeners, removeTableDataListener |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected Connection dbcon
protected String query
protected int column_count
protected int[] column_type
Constructor Detail |
public JCResultSetDataSource()
JCResultSetDataSource
object.
public JCResultSetDataSource(Connection dbcon, String query)
JCResultSetDataSource
object given a Connection
object and query String.
dbcon
- query
- Method Detail |
public boolean executeQuery() throws SQLException
JCVector
.
SQLException
- If a database access error occurred.public Connection getConnection()
public void setConnection(Connection dbcon)
dbcon
- public String getQuery()
public void setQuery(String query)
query
- public int[] getColumnTypes()
public int getColumnType(int column)
column
-
public int getColumnDatatype(int column)
column
-
public boolean connect(String driver, String url, Properties properties) throws SQLException
driver
- the class name of the JDBC driver to use to
access your database (for example, the JDBC-ODBC driver
can be referenced as "com.ms.jdbc.odbc.JdbcOdbcDriver")
url
- a database url of the form
jdbc:subprotocol:subname
(for example, if
you've exposed the JClassDemo
using an ODBC driver, a
valid URL is "jdbc:odbc:JClassDemo
")properties
- a list of arbitrary String tag/value pairs as
connection arguments; normally at least a user and
password property should be included
True
if a connection was made successfully; false
otherwise
SQLException
- If a database access error occurred.
|
Copyright © 2004 Quest Software Inc.. All rights reserved. |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |