|
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 | +--javax.swing.tree.DefaultMutableTreeNode | +--com.klg.jclass.datasource.DataSourceTreeNode | +--com.klg.jclass.datasource.BaseDataTable | +--com.klg.jclass.datasource.jdbc.DataTable
A copy of the data returned in a JDBC result table will be copied into one of these result tables so the data can be cached. Rows can then be added, deleted or updated through this DataTable.
All operations can access data through row/column idxToBookmarkMap rather than indexes. This facilitates sorting of rows and or columns.
Field Summary | |
protected int |
columns
|
protected com.klg.jclass.datasource.jdbc.MetaData |
metaData
|
protected static int |
NO_ROWS_CHANGED
|
protected static int |
ONE_ROW_CHANGED
|
protected PreparedStatement |
statement
|
Fields inherited from class com.klg.jclass.datasource.BaseDataTable |
bookmark, currentColumn, cursor, eventQueue, initialHashtableSize, insertedRows, internalData, logicallyDeletedRows, parentRow, rowCaches, rowIndexBeforeEvent, store, updatedRows, userData |
Fields inherited from class javax.swing.tree.DefaultMutableTreeNode |
allowsChildren, children, EMPTY_ENUMERATION, parent, userObject |
Fields inherited from interface com.klg.jclass.datasource.DataTableModel |
COMMITTED, CURSOR_BEFORE_FIRST, DELETED, INSERTED, NONEXISTENT, ROOT_BOOKMARK, ROW_NOT_FOUND, UPDATED |
Method Summary | |
Object |
createNewRow()
Creates a new row, called by addRow(). |
protected void |
finalize()
Free any lingering jdbc resources. |
Object |
getCell(long bookmark,
String col_id)
For internal use only. |
protected Object[] |
getRowFromServer(String table,
String query,
long bookmark)
Sends the query to the server, fetches and returns the row. |
com.klg.jclass.datasource.DataTableModel |
materializeTable(com.klg.jclass.datasource.DataModelListener originator,
long bookmark,
TreeNode node)
Called by DataTableModel.createTable to create a new table based on the input criteria. |
void |
refreshRow(long bookmark)
For internal use only. |
com.klg.jclass.datasource.DataTableModel |
requeryLevel()
For internal use only. |
void |
requeryTable(com.klg.jclass.datasource.DataModelListener originator)
Requery all rows in this table and collapse its child nodes. |
void |
restoreRow(long bookmark)
For internal use only. |
void |
saveRow(long bookmark)
For internal use only. |
protected void |
setParameter(int number,
Object value,
int columnType)
Sets parameters in the requery. |
Methods inherited from class com.klg.jclass.datasource.DataSourceTreeNode |
getChildren, getFirstChild, getIterator, getIterator, getIterator, getIterator, getLastChild, getNextChild, getPreviousChild, hasChildren, insert, isChildOf, toString |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
protected static final int NO_ROWS_CHANGED
protected static final int ONE_ROW_CHANGED
protected int columns
protected transient PreparedStatement statement
protected com.klg.jclass.datasource.jdbc.MetaData metaData
Method Detail |
public Object getCell(long bookmark, String col_id) throws DataModelException
getCell
in interface DataTableAbstractionLayer
getCell
in class BaseDataTable
bookmark
- a unique long representing a rowcol_id
- a unique String representing a column
DataModelException
- If get fails.DataTableModel.getResultData(long, java.lang.String)
public com.klg.jclass.datasource.DataTableModel materializeTable(com.klg.jclass.datasource.DataModelListener originator, long bookmark, TreeNode node) throws DataModelException
materializeTable
in interface DataTableAbstractionLayer
materializeTable
in class BaseDataTable
bookmark
- a long which uniquely identifies a roworiginator
- the DataModelListener which initiated this action
DataModelException
- If materializeTable fails.public Object createNewRow()
createNewRow
in interface DataTableModel
createNewRow
in class BaseDataTable
public void saveRow(long bookmark) throws DataModelException
saveRow
in interface DataTableAbstractionLayer
saveRow
in class BaseDataTable
bookmark
- a unique long indicating which row
to commit to the datasource.
DataModelException
- If save fails.BaseDataTable.commitRow(com.klg.jclass.datasource.DataModelListener, long)
,
DataModel.updateAll(com.klg.jclass.datasource.DataModelListener)
public com.klg.jclass.datasource.DataTableModel requeryLevel() throws DataModelException
requeryLevel
in interface DataTableModel
requeryLevel
in class BaseDataTable
DataModelException
- If root level requery fails.public void restoreRow(long bookmark)
restoreRow
in interface DataTableAbstractionLayer
restoreRow
in class BaseDataTable
bookmark
- a long which uniquely identifies a rowDataTableModel.cancelRowChanges(com.klg.jclass.datasource.DataModelListener, long)
,
DataModel.cancelAll(com.klg.jclass.datasource.DataModelListener)
public void refreshRow(long bookmark) throws DataModelException
refreshRow
in interface DataTableAbstractionLayer
refreshRow
in class BaseDataTable
bookmark
- a long which uniquely identifies a row
DataModelException
- If requery from data source fails.DataTableModel.requeryRow(com.klg.jclass.datasource.DataModelListener, long)
public void requeryTable(com.klg.jclass.datasource.DataModelListener originator) throws DataModelException
requeryTable
in interface DataTableModel
requeryTable
in class BaseDataTable
originator
- the DataModelListener which initiated this action
DataModelException
- If requery fails.TreeData.requeryAll(com.klg.jclass.datasource.DataModelListener)
protected Object[] getRowFromServer(String table, String query, long bookmark) throws DataModelException
DataModelException
- If requery from data source fails.protected void setParameter(int number, Object value, int columnType) throws DataModelException
number
- the ordinal of the column in the statementvalue
- the Object value to be setcolumnType
- one of the java.sql.Types constants
DataModelException
- If setParameter fails.protected void finalize()
finalize
in class Object
|
Copyright © 2004 Quest Software Inc.. All rights reserved. |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |