|
Components |
|
| |||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
com.sas.storage.jdbc.JDBCAdapter
public abstract class JDBCAdapter
The JDBCAdapter is an abstract class that provides common methods that assist in displaying JDBC data sources in a viewer.
Two ways have been provided to create an adapter. The first is to supply a java.sql.Connection
and a query statement, either through the constructor, or through set methods.
The setConnection()
method will apply the connection object. The
setQueryStatement()
method will apply the SQL query statement. When
non-null values for both connection and query statement have been
applied, the adapter is initialized and ready to use.
The query statement must be a SQL query that is valid for the JDBC data
source. This may include a blank statement, if valid.
The other way to create an adapter is to use the constructor taking a java.sql.ResultSet
object as a parameter.
In this case, calling the setConnection()
methods will have no affect. If the result set is an instance
of a RowSet, then calling the The setQueryStatement()
method will set the command on the row set, otherwise
it will do nothing.
If autoCommit
is true when any setXXX method is used, an updateRow()
method will be called upon the ResultSet so that the value(s) passed
by the setXXX method are updated to the data source.
If autoCommit
is false, it is necessary to call the commitRow()
method
to commit changes to the data source.
This adapter works best with JDBC drivers that can create scrollable result sets. Table
viewers usually need to read backwards to support scrolling the viewer. However, the adapter
can support using scrolling viewers with forward-only result sets (ResultSet.TYPE_FORWARD_ONLY
).
This is accomplished by re-executing the query statement to obtain a new result set whenever there is a need to read a
row before the current row. There is a performance penalty for this because the server must be requeried and the adapter
re-initializes. If you want to turn off this feature, call setResultSetRequeryUsed(false)
.
This option is not available when the adapter is created with a ResultSet object directly because the query cannot be
executed again in this case unless the result set is a RowSet object.
This table shows the constants from the java.sql.Types
class and
whether this adapter supports getting those types. It also shows whether the
adapter supports setting those types with either a "setXXX" or "setFormattedXXX"
method. A viewer will call a "setFormattedXXX" method on the adapter when
there is a change made to a value shown in the viewer.
JDBC Type | get | set | setFormatted |
BIT | X | X | X |
TINYINT | X | X | X |
SMALLINT | X | X | X |
INTEGER | X | X | X |
BIGINT | X | X | X |
FLOAT | X | X | X |
REAL | X | X | X |
DOUBLE | X | X | X |
NUMERIC | X | X | X |
DECIMAL | X | X | X |
CHAR | X | X | X |
VARCHAR | X | X | X |
LONGVARCHAR | X | ||
DATE | X | X | X |
TIME | X | X | X |
TIMESTAMP | X | X | X |
BINARY | X | X | |
VARBINARY | X | X | |
LONGVARBINARY | X | ||
NULL | |||
OTHER | |||
JAVA_OBJECT | X | X | |
DISTINCT | |||
STRUCT | X | X | |
ARRAY | X | ||
BLOB | X | ||
CLOB | X | ||
REF | X |
Field Summary | |
---|---|
protected boolean |
autoCommit
If true, updates will be automatically committed to the database. |
static java.lang.String |
CLASS_NAME
One of the valid values for getColumnInfo . |
protected java.lang.String |
columnInfoUsed
The value passed in by setColumInfoUsed. |
protected java.sql.Connection |
conn
The Connection object supplied by the constructor or setModel method. |
protected boolean |
designTime
True if the class is used at webAF design time. |
protected com.sas.util.transforms.TransformInterface |
displayTransform
The transform used on the data. |
protected boolean |
forwardOnly
If true, the adapter is connected to a result set that is ResultSet.TYPE_FORWARD_ONLY . |
protected boolean |
initialized
True if the adapter is initialized with a Connection object and queryStatement . |
protected boolean |
isRowCountKnown
Indicates if the number of rows in the result set is known |
static java.lang.String |
LABEL
One of the valid values for setColumnInfoUsed . |
protected java.sql.ResultSetMetaData |
meta
The ResultSetMetaData object created from the Statement object when queryStatement
is supplied. |
static java.lang.String |
NAME
One of the valid values for setColumnInfoUsed . |
protected boolean |
printWarnings
True if the adapter should print SQLWarning messages. |
protected boolean |
queryRowCountDisabled
Indicates if the row count should be determined by executing a "count" query or the rowCountQueryString if one is provided. |
protected java.lang.String |
queryStatement
The SQL query statement. |
static java.lang.String |
RB_KEY
|
protected boolean |
readOnly
True if the adapter is read-only. |
protected java.sql.ResultSet |
result
The ResultSet object created from the Statement object when queryStatement
is supplied. |
protected boolean |
resultSetRequeryUsed
If the adapter is connected to a result set that is ResultSet.TYPE_FORWARD_ONLY this property controls whether the
result set can be requeried to permit a simulation of scrolling backwards. |
protected int |
resultSetType
The type of the ResultSet. |
protected boolean |
resultSetUsed
If true, no connections or queries will be used to remake a previously created result set |
protected boolean |
retrieveNumericTypesAsDouble
Indicates if numeric JDBC types will be retrieved from the ResultSet with the getDouble method |
protected int |
rowCount
Used with counting rows in the result set in the calculateRowCount method. |
protected java.lang.String |
rowCountQueryString
The query string used to determine the number of rows in the result set |
protected int |
rowNumber
Indicates the row number the result set cursor is currently positioned on. |
protected javax.swing.event.SwingPropertyChangeSupport |
spcs
Used to support property changes in the webAF customizer |
protected java.sql.Statement |
stmt
The Statement object created from the Connection. |
protected boolean |
trimUsed
If true, all character string data returned from the data source will be trimmed of whitespace according to String.trim() . |
Constructor Summary | |
---|---|
JDBCAdapter()
Default constructor called when the adapter is made in a webAF project. |
|
JDBCAdapter(java.sql.Connection conn,
java.lang.String queryStatement)
Constructor used to create an initialized adapter. |
|
JDBCAdapter(java.sql.ResultSet result)
Constructor used to connect an adapter directly to a previously created ResultSet. |
Method Summary | |
---|---|
void |
addPropertyChangeListener(java.beans.PropertyChangeListener listener)
|
void |
addPropertyChangeListener(java.lang.String propertyName,
java.beans.PropertyChangeListener listener)
|
protected int |
calculateRowCount()
Counts the number of rows when the underlying result set is not scrollable ( TYPE_FORWARD_ONLY ) and resultSetRequeryUsed is true. |
void |
close()
Closes the statement and the result set. |
protected boolean |
doAbsolute(int index)
For scrollable result sets, the absolute() method is called on the result set. |
protected int |
doCountColumns(int maxCount)
The number of columns known to be available. |
protected void |
doUpdateCell(int col,
java.lang.Object value)
This method is called by public "setter" methods. |
protected void |
finalize()
Closes the JDBC objects |
protected abstract void |
fireCellEvent(int row,
int column)
Fire a specific event for a model signaling that one cell has changed. |
protected abstract void |
fireModelEvent()
Fire a default event for a model signaling the some aspect of the model has changed. |
protected abstract void |
fireModelEvent(java.util.EventObject event)
Fire a specific event for a model signaling that some aspect of the model has changed. |
boolean |
getAutoCommit()
Gets the value of autoCommit . |
java.lang.Object |
getColumnInfo(int index,
java.lang.String columnInfoName)
Returns the named information for a column. |
java.lang.String[] |
getColumnInfoNames()
Returns an array of the named information that can be returned for the columns. |
java.sql.Connection |
getConnection()
Gets the connection object used as the adapter's model. |
com.sas.util.transforms.TransformInterface |
getDisplayTransform()
Return current transform, which can be null |
java.sql.Connection |
getModel()
Returns the connection object attached to the adapter when the adapter is part of a webAF project. |
boolean |
getPrintWarnings()
Returns whether or not to print SQL warnings to System.out . |
java.lang.String |
getQueryStatement()
Returns the SQL query that has been applied to the JDBC data source. |
protected int |
getResultSetConcurrency()
|
protected int |
getResultSetRowCount()
This method finds the number of rows in a JDBC ResultSet using the standard JDBC technique. |
int |
getResultSetType()
The resultSetType value returned at design time reflects the value that was set by calling the setResultSetType
method, or the default value of ResultSet.TYPE_SCROLL_SENSITIVE . |
protected int |
getRowCountByCountFunction()
This method attempts to find the number of rows in a JDBC ResultSet by using the SQL count function. |
java.lang.String |
getRowCountQueryString()
Returns the query String used to determine the row count when the queryRowCountDisabled is set to false. |
protected void |
init()
Creates the Statement, ResultSet, and ResultSetMetaData objects using the queryStatement whenever the initialized field is false. |
protected void |
initializeData()
|
boolean |
isQueryRowCountDisabled()
Indicates if the row count should be determined by executing a "count" query. |
boolean |
isReadOnly()
The value returned at design time reflects the value that was set by calling the setReadOnly
method, or the default value of true. |
boolean |
isResultSetRequeryUsed()
Gets the value of resultSetRequeryUsed . |
boolean |
isRetrieveNumericTypesAsDouble()
Returns a value indicating whether to retrieve numeric JDBC types with the ResultSet getDouble method. |
boolean |
isTrimUsed()
Returns the value of trimUsed . |
protected void |
printSQLWarning(java.sql.SQLWarning w)
Prints message, SQL state and vendor error code from SQLWarning objects
if printWarnings is true. |
protected void |
putColumnInfoUsed(java.lang.String info)
Sets the column information that is currently being used as the column label. |
protected void |
putValueAt(java.lang.Object value,
int rowIndex,
int columnIndex)
Updates value into the cell at rowIndex, columnIndex . |
void |
refresh()
Reinitializes the result set and fires a model event. |
void |
removePropertyChangeListener(java.beans.PropertyChangeListener listener)
|
void |
removePropertyChangeListener(java.lang.String propertyName,
java.beans.PropertyChangeListener listener)
|
protected java.lang.Class |
retrieveColumnClass(int index)
Returns the class of a column. |
protected int |
retrieveColumnCount()
Returns the number of columns in the result set. |
protected int |
retrieveColumnIndex(java.lang.String name)
Returns the column index for a column name. |
protected java.lang.String |
retrieveColumnInfoUsed()
Returns the column information that is currently being used as the column label. |
protected java.lang.String |
retrieveColumnLabel(int index)
If columnInfoUsed is "LABEL", gets the suggested column title provided by ResultSetMetaData object for the column at the given index. |
protected java.lang.Double |
retrieveRawSASNumericValue(int row,
int col)
Returns the raw value of a cell in the JDBC data type of the cell. |
protected java.lang.Double |
retrieveRawSASNumericValue(int col,
java.sql.ResultSet result)
Returns the raw value of a cell as a Double |
protected java.lang.Object |
retrieveValueAt(int row,
int col)
Returns value of a cell in the JDBC data type of the cell. |
protected java.lang.Object |
retrieveValueAt(int col,
java.sql.ResultSet result)
Returns value of a cell in the JDBC data type of the cell. |
void |
setAutoCommit(boolean autoCommit)
Sets the value of autoCommit . |
void |
setConnection(java.sql.Connection conn)
Sets the connection object on the adapter. |
void |
setDisplayTransform(com.sas.util.transforms.TransformInterface newTransform)
Set transform to given transform, which can be null |
void |
setModel(java.sql.Connection conn)
Enables attaching a connection object to the adapter when the adapter is part of a webAF project. |
void |
setPrintWarnings(boolean printWarnings)
Sets whether or not to print warnings from methods that generate SQLWarning objects. |
void |
setQueryRowCountDisabled(boolean queryRowCountDisabled)
Sets a value indicating if the row count should be determined by executing a "count" query. |
void |
setQueryStatement(java.lang.String queryStatement)
The queryStatement should be any SQL query that is
valid for the JDBC data source. |
void |
setReadOnly(boolean readOnly)
Attempts to change the adapter's readOnly field between
true and false. |
void |
setResultSetRequeryUsed(boolean resultSetRequeryUsed)
In order to simulate scrolling in drivers that do not support scrollable result sets, the resultSetRequeryUsed property may be set to true
to allow the adapter to re-execute the query and obtain a new result set. |
void |
setResultSetType(int type)
Changes the type of the result set to determine whether it can be scrolled and whether changes to column values made to the underlying data base are ever shown in the result set. |
void |
setRetrieveNumericTypesAsDouble(boolean retrieveAsDouble)
Indicates whether to retrieve numeric JDBC types with the ResultSet getDouble method. |
void |
setRowCountQueryString(java.lang.String rowCountQueryString)
Sets the query String used to determine the row count when the queryRowCountDisabled is set to false. |
void |
setTrimUsed(boolean trimUsed)
Set the value of trimUsed . |
Field Detail |
---|
public static final java.lang.String RB_KEY
public static final java.lang.String NAME
setColumnInfoUsed
.
public static final java.lang.String LABEL
setColumnInfoUsed
.
This is the default value.
public static final java.lang.String CLASS_NAME
getColumnInfo
.
protected boolean initialized
queryStatement
.
protected boolean readOnly
protected int resultSetType
protected boolean autoCommit
protected boolean printWarnings
protected boolean forwardOnly
ResultSet.TYPE_FORWARD_ONLY
.
protected boolean resultSetRequeryUsed
ResultSet.TYPE_FORWARD_ONLY
this property controls whether the
result set can be requeried to permit a simulation of scrolling backwards.
It initializes to true.
protected boolean trimUsed
String.trim()
.
protected boolean resultSetUsed
protected java.sql.Connection conn
setModel
method.
protected java.sql.Statement stmt
protected java.sql.ResultSet result
queryStatement
is supplied.
protected java.sql.ResultSetMetaData meta
queryStatement
is supplied.
protected java.lang.String queryStatement
protected com.sas.util.transforms.TransformInterface displayTransform
protected boolean designTime
protected javax.swing.event.SwingPropertyChangeSupport spcs
protected java.lang.String columnInfoUsed
protected java.lang.String rowCountQueryString
protected boolean queryRowCountDisabled
protected boolean isRowCountKnown
protected int rowNumber
protected int rowCount
protected boolean retrieveNumericTypesAsDouble
Constructor Detail |
---|
public JDBCAdapter()
public JDBCAdapter(java.sql.ResultSet result)
result
- ResultSet to use.public JDBCAdapter(java.sql.Connection conn, java.lang.String queryStatement)
conn
- A java.sql.Connection
object.queryStatement
- A SQL query that is valid for the database
represented by conn
.Method Detail |
---|
protected void initializeData()
protected void init()
queryStatement
whenever the initialized field is false.
java.lang.IllegalStateException
- If the Connection or queryStatement
are null.protected int getResultSetConcurrency()
public boolean isReadOnly()
setReadOnly
method, or the default value of true. At run time, the value returned is the actual concurrency of the ResultSet
object. It should be noted that this value may be different from what was passed to the
setReadOnly
method. This is because a driver may return a result set with a concurrency different
than what was requested depending on if the requested type is supported.
If any SQL warnings have been generated, they will have been printed if printWarnings()
was set to true.
public void setReadOnly(boolean readOnly)
readOnly
field between
true and false. This causes initialization or re-initialization of the adapter.
This attempts to create a new result set with the desired concurrency if the adapter was
created with a java.sql.Connection.
Calling this method has no affect if the constructer taking a ResultSet was used to create the adapter and the ResultSet is not a RowSet. If it was instantiated with a RowSet, then the concurrency property will be set on the rowset object and it will be reinitialized.
If readOnly
is false, it will use ResultSet.CONCUR_UPDATABLE
when making the result set. If any SQL warnings have been generated, they
will be printed if printWarnings()
has been set to true.
readOnly
- Sets to true or false.public void setResultSetType(int type)
ResultSet.TYPE_FORWARD_ONLY, ResultSet.TYPE_SCROLL_INSENSITIVE
,
or ResultSet.TYPE_SCROLL_SENSITIVE
.
If the value of type changes from current value, a new statement object is created and the query statement is executed again.
type
- the type of result set desired
java.lang.IllegalArgumentException
- if invalid result set typepublic int getResultSetType()
resultSetType
value returned at design time reflects the value that was set by calling the setResultSetType
method, or the default value of ResultSet.TYPE_SCROLL_SENSITIVE
. At run time, the value returned is the actual type of the ResultSet
object. It should be noted that this value may be different from what was passed to the
setResultSetType
method. This is because a driver may return a result set with a different type
than what was requested depending on if the requested type is supported.
If any SQL warnings have been generated, they will have been printed if printWarnings()
was set to true.
ResultSet
constants, indicating the type: TYPE_FORWARD_ONLY,
TYPE_SCROLL_INSENSITIVE,
or TYPE_SCROLL_SENSITIVE
public boolean getAutoCommit()
autoCommit
. If the value is true, the setXXX
methods will call an updateRow
on the result set so that the
new value(s) will be committed to the database. If false, it
will be necessary to use commitRow
to commit changes.
public void setAutoCommit(boolean autoCommit)
autoCommit
. If the value is true, the setXXX
methods will call an updateRow
on the result set so that the
new value(s) will be committed to the database. If false, it
will be necessary to use commitRow
to commit changes.
autoCommit
- True or false.public java.sql.Connection getConnection()
public void setConnection(java.sql.Connection conn)
conn
- A java.sql.Connection object.public java.sql.Connection getModel()
getConnection
).
public void setModel(java.sql.Connection conn)
conn
- A java.sql.Connection object.public java.lang.String getQueryStatement()
public void setQueryStatement(java.lang.String queryStatement)
queryStatement
should be any SQL query that is
valid for the JDBC data source. It is used to extract the desired data
from the database.
Calling this method has no affect if the constructer taking a ResultSet was used to create the adapter and the ResultSet is not a RowSet.
queryStatement
- The SQL query to apply.public boolean isResultSetRequeryUsed()
resultSetRequeryUsed
.
public void setResultSetRequeryUsed(boolean resultSetRequeryUsed)
resultSetRequeryUsed
property may be set to true
to allow the adapter to re-execute the query and obtain a new result set. This will allow the adapter to scroll through the rows again.
This behavior will incur a performance penalty, but it will then be possible to use such data sources with more kinds of viewers
and with the SAS chart controls. If false, the adapter may only scroll forward until there are no more rows.
This property is initialized to true except in the case where the adapter is instantiated with a ResultSet object that is not a RowSet, since the
query cannot be re-executed in this case. Setting the resultSetRequeryUsed
property to true in this case will cause an IllegalArgumentException
to be thrown.
resultSetRequeryUsed
- true or false.public boolean isTrimUsed()
trimUsed
.
public void setTrimUsed(boolean trimUsed)
trimUsed
. If true, all character strings returned from
the data source will be trimmed of whitespace according to String.trim()
.
trimUsed
- True or false.public com.sas.util.transforms.TransformInterface getDisplayTransform()
getDisplayTransform
in interface com.sas.util.transforms.DisplayTransformInterface
public void setDisplayTransform(com.sas.util.transforms.TransformInterface newTransform)
setDisplayTransform
in interface com.sas.util.transforms.DisplayTransformInterface
newTransform
- transform to be setpublic void setRetrieveNumericTypesAsDouble(boolean retrieveAsDouble)
retrieveAsDouble
- boolean value indicating whether to retrieve numeric JDBC types with the ResultSet getDouble methodpublic boolean isRetrieveNumericTypesAsDouble()
setRetrieveNumericTypesAsDouble(boolean)
protected boolean doAbsolute(int index) throws java.sql.SQLException
absolute()
method is called on the result set.
This method can simulate scrolling backwards for forward-only result sets, if the resultSetRequeryUsed
property is set to true(the default). In this case the forward-only result sets will be requeried as needed to return
to prior row(s). If it returns false, an attempt to move past the last row will throw
an exception.
- Parameters:
index
- The row number to move to.
- Returns:
- true if it was possible to move to the given row index or false if the cursor is
before the first row or after the last row.
- Throws:
java.sql.SQLException
- If index
is greater than the number of rows.
IlegalStateException
- If trying to scroll backward in a forward-only result set and
resultSetRequeryUsed
is false, or the end of the result set has been
reached and resultSetRequeryUsed
is false.
protected java.lang.String retrieveColumnInfoUsed()
NAME
or LABEL
if the field has been set.
protected void putColumnInfoUsed(java.lang.String info)
info
- The type of information to use in column labels.protected java.lang.String retrieveColumnLabel(int index) throws java.sql.SQLException
index
- A one-based index that identifies the column.
java.sql.SQLException
- - Thrown if the ResultSetMetaData throws a SQLException.protected int retrieveColumnIndex(java.lang.String name) throws java.sql.SQLException
name
- The column name.
java.sql.SQLException
- If column name is not found.public void close()
public void refresh()
protected void finalize()
finalize
in class java.lang.Object
protected java.lang.Class retrieveColumnClass(int index) throws java.sql.SQLException, java.lang.ClassNotFoundException
index
- - A one-based index that identifies the column.
java.sql.SQLException
- Thrown if ResultSetMetaData throws a SQLException.
java.lang.ClassNotFoundException
- Thrown if the class of the given column cannot be loaded.protected int doCountColumns(int maxCount) throws java.sql.SQLException
retrieveColumnCount
is returned.
maxCount
- Maximum number of columns to read, or 0 to read indefinitely.
Thus maxCount is only used as a limiting factor when the implementation has to actually do computation (e.g. fetch observations).
java.sql.SQLException
- Thrown if ResultSetMetaData throws a SQLException.protected int retrieveColumnCount() throws java.sql.SQLException
java.sql.SQLException
- Thrown if ResultSetMetaData throws a SQLException.protected int calculateRowCount() throws java.sql.SQLException
TYPE_FORWARD_ONLY
) and resultSetRequeryUsed
is true.
Otherwise, the result of retrieveRowCount()
is returned.
java.sql.SQLException
- Thrown if ResultSetMetaData throws an SQLException.public java.lang.String getRowCountQueryString()
queryRowCountDisabled
is set to false.
The rowCountQueryString
is not used when the adapter is instantiated with a ResultSet.
public void setRowCountQueryString(java.lang.String rowCountQueryString)
queryRowCountDisabled
is set to false.
The rowCountQueryString
is not used when the adapter is instantiated with a ResultSet. If no rowCountQueryString
has been set, then the adapter will create a query containing the sql count function to execute to obtain the row count for
the result set.
rowCountQueryString
- the query String used to determine the row count when the queryRowCountDisabled
is set to false.public boolean isQueryRowCountDisabled()
setQueryRowCountDisabled(boolean)
public void setQueryRowCountDisabled(boolean queryRowCountDisabled)
getRowCountByCountFunction
method. Otherwise, the row count is determined by
the getResultSetRowCount
method. The default value of this property is false.
If the adapter is instantiated with a ResultSet, this property is ignored and the row count is determined by the
getResultSetRowCount
method.
queryRowCountDisabled
- a value indicating how the row count is calculated.getRowCountByCountFunction()
,
getResultSetRowCount()
protected int getRowCountByCountFunction()
A value of -1 is returned if the adapter has not been initialized, or an SQLException is thrown while attempting to find the row count.
protected int getResultSetRowCount() throws java.sql.SQLException
A value of -1 is returned if the adapter has not been initialized, or an SQLException is thrown while attempting to find the row count.
java.sql.SQLException
protected void putValueAt(java.lang.Object value, int rowIndex, int columnIndex) throws java.sql.SQLException
value
into the cell at rowIndex, columnIndex
.
If autoCommit
is true, it also updates the row in the result set.
If autoCommit
is false, use commitRow
to update the row.
rowIndex
- A one-based index that identifies the cell's row.columnIndex
- A one-based index that identifies the cell's column.value
- The cell's new value.
SqlException
- Thrown if ResultSet throws a SQLException.
java.lang.IllegalStateException
- Thrown if the operation cannot be completed (e.g. read-only).
java.sql.SQLException
protected java.lang.Object retrieveValueAt(int row, int col) throws java.sql.SQLException
row
- A one-based index that identifies the cell's row.col
- A one-based index that identifies the cell's column.
java.sql.SQLException
- Thrown if ResultSet throws a SQLException.protected java.lang.Double retrieveRawSASNumericValue(int row, int col) throws java.sql.SQLException
row
- A one-based index that identifies the cell's row.col
- A one-based index that identifies the cell's column.
java.sql.SQLException
- Thrown if ResultSet throws a SQLException.protected java.lang.Object retrieveValueAt(int col, java.sql.ResultSet result) throws java.sql.SQLException
col
- A one-based index that identifies the cell's column.result
- ResultSet in which to get values.
java.sql.SQLException
- Thrown if ResultSet throws a SQLException.protected java.lang.Double retrieveRawSASNumericValue(int col, java.sql.ResultSet result) throws java.sql.SQLException
col
- A one-based index that identifies the cell's column.result
- ResultSet in which to get values.
java.sql.SQLException
- Thrown if ResultSet throws a SQLException.protected void doUpdateCell(int col, java.lang.Object value) throws java.sql.SQLException
setFormattedCell()
, etc. It must be possible
to convert the Object
into the correct type required by the updateXXX method.
the
- one-based column numberthe
- value to be updated into the cell
java.sql.SQLException
- if a JDBC method throws a SQLException.public java.lang.Object getColumnInfo(int index, java.lang.String columnInfoName) throws com.sas.table.TableException
getColumnInfo
in interface com.sas.table.StaticColumnInfoInterface
index
- the index identifies the column, needs to be one-basedcolumnInfoName
- the name of the information a user wants to query for, the valid values are
returned from a call to getColumnInfoNames().
com.sas.util.UncheckedException
- thrown if a call to the model yields an exception
java.lang.IllegalArgumentException
- if columnInfoName
is not a valid column information value
com.sas.table.TableException
getColumnInfoNames()
,
StaticColumnInfoInterface
public java.lang.String[] getColumnInfoNames() throws com.sas.table.TableException
getColumnInfoNames
in interface com.sas.table.StaticColumnInfoInterface
com.sas.table.TableException
StaticColumnInfoInterface
protected void printSQLWarning(java.sql.SQLWarning w)
SQLWarning
objects
if printWarnings
is true. This method is called from init()
where SQL warnings may be generated.
w
- a SQLWarning objectpublic boolean getPrintWarnings()
System.out
.
public void setPrintWarnings(boolean printWarnings)
SQLWarning
objects.
If true, messages, SQL state codes, and vendor error codes will go to System.out
.
printWarnings
- true to print warnings, false to suppress printingpublic void addPropertyChangeListener(java.beans.PropertyChangeListener listener)
public void addPropertyChangeListener(java.lang.String propertyName, java.beans.PropertyChangeListener listener)
public void removePropertyChangeListener(java.beans.PropertyChangeListener listener)
public void removePropertyChangeListener(java.lang.String propertyName, java.beans.PropertyChangeListener listener)
protected abstract void fireCellEvent(int row, int column)
row
- row number of the cell that has been modifiedcolumn
- column number of the cell that has been modifiedprotected abstract void fireModelEvent(java.util.EventObject event)
event
- Event that must be cast that should be firedprotected abstract void fireModelEvent()
|
Components |
|
| |||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |