|
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.higrid.SummaryDataTable
The data table for a summary row type.
Field Summary | |
protected int |
initialHashtableSize
|
protected Hashtable |
internalData
|
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 |
Constructor Summary | |
SummaryDataTable(com.klg.jclass.datasource.MetaDataModel footerMetaData,
com.klg.jclass.datasource.MetaDataModel beforeDetailsMetaData,
com.klg.jclass.datasource.MetaDataModel afterDetailsMetaData)
SummaryDataTable Constructor. |
Method Summary | |
void |
absolute(int ordinal_position)
Move the cursor to this ordinal position. |
long |
addRow(com.klg.jclass.datasource.DataModelListener originator)
Adds a row whose status will be INSERTED. |
long |
addRow(com.klg.jclass.datasource.DataModelListener originator,
Object row)
Adds a populated row whose status will be INSERTED. |
long |
addRow(com.klg.jclass.datasource.DataModelListener originator,
Object row,
int status)
Adds a populated row whose status will be 'status'. |
long |
addRow(com.klg.jclass.datasource.DataModelListener originator,
Object row,
int status,
int ordinal)
Adds a populated row whose status will be 'status'. |
void |
afterLast()
Position the cursor after the last row. |
protected void |
aggregateRowNode(com.klg.jclass.higrid.RowNode rootNode,
com.klg.jclass.higrid.Aggregate aggregate,
com.klg.jclass.higrid.HiGrid grid)
Perform the aggregation as the data tables are traversed. |
void |
beforeFirst()
Position the cursor before the first row. |
void |
cancelAllRowChanges(com.klg.jclass.datasource.DataModelListener originator)
Cancel all uncommited rows. |
void |
cancelRowChanges(com.klg.jclass.datasource.DataModelListener originator,
long bookmark)
Cancel uncommitted row changes. |
void |
clearEventQueue()
Recursively clear pending events from a transaction. |
void |
commitAll(com.klg.jclass.datasource.DataModelListener originator)
Commit all uncommitted rows. |
boolean |
commitRow(com.klg.jclass.datasource.DataModelListener originator,
long bookmark)
Commit row. |
void |
commitSubTree(com.klg.jclass.datasource.DataModelListener originator,
long subTreeRootBookmark)
Commit all pending changes in this subtree. |
void |
conditionallyCommitYourselfAndChildren(com.klg.jclass.datasource.DataModelListener originator)
Recurse on this node and each of its children and commit all changes in each if commitPolicy does not equal COMMIT_MANUALLY |
Object |
createNewRow()
Creates a new (blank) row that can be used as an argument to one of the addRow() methods. |
com.klg.jclass.datasource.DataTableModel |
createTable(com.klg.jclass.datasource.DataModelListener originator,
long bookmark,
TreeNode node)
Create and return the DataTable which corresponds to the specifed row of this parent for the indicated child MetaData object. |
void |
deleteCacheChildren(com.klg.jclass.datasource.DataModelListener originator)
Deletes the subtree of DataTables rooted with this DataTable as its root. |
void |
deleteRow(com.klg.jclass.datasource.DataModelListener originator,
long bookmark)
Delete a row. |
boolean |
first()
Position this table's cursor on the first row. |
void |
getAncestors(Vector ancestors)
Return a list of this DataTable's ancestor bookmarks. |
protected com.klg.jclass.higrid.SummaryData |
getCachedData(int rowIndex,
String name)
Retrieves the cached data for display. |
protected String |
getCachedDataID(int rowIndex,
String name,
com.klg.jclass.higrid.RowNode rowNode)
Retrieves the cached data id. |
long |
getCurrentBookmark()
Return the bookmark of the current row. |
int |
getCursor()
Gets the cursor of the data table model. |
protected com.klg.jclass.higrid.RowNode |
getDataSourceRowNode(int metaID,
com.klg.jclass.datasource.DataTableModel dataTable,
com.klg.jclass.higrid.RowNode rowNode)
Retrieves the record row node with a data table for the given meta id. |
long[] |
getDeletedRowBookmarks()
Return a long array of logically deleted row bookmarks. |
long[] |
getInsertedRowBookmarks()
Return a long array of inserted row bookmarks. |
Object |
getInternalData(Object user)
For internal use only. |
com.klg.jclass.datasource.MetaDataModel |
getMetaData()
Return the MetaDataModel for this table. |
long |
getParentBookmark()
Return the parent row for this table. |
Object |
getResultData(com.klg.jclass.higrid.HiGrid grid,
com.klg.jclass.datasource.DataTableModel dataTable,
com.klg.jclass.higrid.RowFormat rowFormat,
com.klg.jclass.higrid.RowNode rowNode,
String name)
Return a value for given summary column identifier. |
protected Object |
getResultData(com.klg.jclass.higrid.HiGrid grid,
com.klg.jclass.datasource.DataTableModel dataTable,
com.klg.jclass.higrid.RowFormat rowFormat,
com.klg.jclass.higrid.RowNode rowNode,
String name,
boolean checkChanged)
Helper method to support both isResultDataChanged() and getResultData(). |
Object |
getResultData(long bookmark,
String column_identifer)
Return a value for given row_identifier/column_identifier. |
long |
getRootAncestorBookmark(long bookmark)
Recurse up the tree and determine the row number of your ultimate ancestor. |
int |
getRowCount()
Return the number of rows in this DataTable. |
long |
getRowIdentifier(int row)
Return an int which will uniquely identify this row. |
int |
getRowIndex(long bookmark)
Given a bookmark, return the zero-relative row index in this table |
int |
getRowStatus(long bookmark)
Return the status of a row, will be one of INSERTED, UPDATED, DELETED, COMMITTED. |
protected int |
getSummaryRow(com.klg.jclass.higrid.RowFormat rowFormat)
Return the summary row index given the row format type. |
com.klg.jclass.datasource.DataTableModel |
getTable(long bookmark,
TreeNode node)
Search the existing children of this node for a child node which matches the input criteria. |
long[] |
getUpdatedRowBookmarks()
Return a long array of updated row bookmarks. |
Object |
getUserData(Object user)
Gets user data. |
boolean |
isAfterLast()
Return true if the cursor is positioned afte the last row. |
boolean |
isBeforeFirst()
Return true if the cursor is positioned before first row. |
boolean |
isModified()
Does this DataTableModel contain any pending inserts, updates or deletes? |
protected boolean |
isResultDataChanged(com.klg.jclass.higrid.HiGrid grid,
com.klg.jclass.datasource.DataTableModel dataTable,
com.klg.jclass.higrid.RowFormat rowFormat,
com.klg.jclass.higrid.RowNode rowNode,
String name)
Determine if the summary row data has changed in value. |
boolean |
isSubTreeModified(long subTreeRootBookmark)
Does the subtree rooted at subTreeRootBookmark contain modified nodes? Modified means it has pending insert, update or delete changes. |
boolean |
isTableOrChildrenModified()
Are there any modifications to this table or any of its child nodes? |
boolean |
last()
Position this table's cursor on the last row. |
void |
moveCursorToRow(long bookmark)
Move the cursor to the row indicated by the bookmark. |
void |
moveToRow(long bookmark)
Internal method, do not use. |
boolean |
next()
Advance the cursor by one row. |
boolean |
previous()
Position this table's cursor to the previous row. |
void |
processEventQueue(com.klg.jclass.datasource.DataModelListener originator)
Recursively process pending events from a transaction |
void |
relative(int rows)
Move the cursor forward or backward by "n" rows from the current position. |
com.klg.jclass.datasource.DataTableModel |
requeryLevel()
Requery a DataTable. |
void |
requeryRow(com.klg.jclass.datasource.DataModelListener originator,
long bookmark)
Re-reads a row from the originating data source. |
void |
requeryRowAndDetails(com.klg.jclass.datasource.DataModelListener originator,
long bookmark)
Requery a DataTable row and all children. |
void |
requeryTable(com.klg.jclass.datasource.DataModelListener originator)
Requery all rows in this table and collapse its child nodes. |
protected void |
resetSummaryDataTables(boolean clearCachedData)
Reset the summary data tables to remove all cached data. |
protected void |
resetSummaryRow(Vector summaryRow)
|
void |
rollbackTransaction()
Rollback transaction. |
protected void |
setCachedData(int rowIndex,
String name,
Object object)
Stores the cached data for display. |
void |
setInternalData(Object user,
Object data)
For internal use only. |
void |
setUserData(Object user,
Object data)
Sets user data. |
boolean |
tableIsAncestor(com.klg.jclass.datasource.DataTableModel table2)
Given a DataTable, returns whether it is an ancestor of (or equal to) itself |
void |
updateCell(com.klg.jclass.datasource.DataModelListener originator,
long bookmark,
String column_identifer,
Object value)
Update a cell. |
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, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
protected Hashtable internalData
protected int initialHashtableSize
Constructor Detail |
public SummaryDataTable(com.klg.jclass.datasource.MetaDataModel footerMetaData, com.klg.jclass.datasource.MetaDataModel beforeDetailsMetaData, com.klg.jclass.datasource.MetaDataModel afterDetailsMetaData)
footerMetaData
- The Footer MetaData for this data table.beforeDetailsMetaData
- The BeforeDetails MetaData for this data table.afterDetailsMetaData
- The AfterDetails MetaData for this data table.Method Detail |
protected void resetSummaryDataTables(boolean clearCachedData)
clearCachedData
- True if the cached data are to be removed.protected void resetSummaryRow(Vector summaryRow)
protected boolean isResultDataChanged(com.klg.jclass.higrid.HiGrid grid, com.klg.jclass.datasource.DataTableModel dataTable, com.klg.jclass.higrid.RowFormat rowFormat, com.klg.jclass.higrid.RowNode rowNode, String name)
grid
- The HiGrid.rowFormat
- The row format for this row.dataTable
- The record type data table.rowNode
- The row node of this row.name
- The summary column identifier.
public Object getResultData(com.klg.jclass.higrid.HiGrid grid, com.klg.jclass.datasource.DataTableModel dataTable, com.klg.jclass.higrid.RowFormat rowFormat, com.klg.jclass.higrid.RowNode rowNode, String name)
grid
- The HiGrid.rowFormat
- The row format for this row.dataTable
- The record type data table.rowNode
- The row node of this row.name
- The summary column identifier.
protected Object getResultData(com.klg.jclass.higrid.HiGrid grid, com.klg.jclass.datasource.DataTableModel dataTable, com.klg.jclass.higrid.RowFormat rowFormat, com.klg.jclass.higrid.RowNode rowNode, String name, boolean checkChanged)
grid
- The HiGrid.rowFormat
- The row format for this row.dataTable
- The record type data table.rowNode
- The row node of this row.name
- The summary column identifier.checkChanged
- True if result data changed is to be check.
protected int getSummaryRow(com.klg.jclass.higrid.RowFormat rowFormat)
rowFormat
- The row format.
protected String getCachedDataID(int rowIndex, String name, com.klg.jclass.higrid.RowNode rowNode)
rowIndex
- The row index for the summary data table.name
- The column identifier.rowNode
- The summary row node.
protected com.klg.jclass.higrid.SummaryData getCachedData(int rowIndex, String name)
rowIndex
- The row index for the summary data table.name
- The cached data identifier.
protected void setCachedData(int rowIndex, String name, Object object)
rowIndex
- The row index for the summary data table.name
- The cached data identifier.object
- The data object.protected com.klg.jclass.higrid.RowNode getDataSourceRowNode(int metaID, com.klg.jclass.datasource.DataTableModel dataTable, com.klg.jclass.higrid.RowNode rowNode)
metaID
- The meta id of the meta table associated with the data tabledataTable
- The current level data table.rowNode
- The row node of the current level.
protected void aggregateRowNode(com.klg.jclass.higrid.RowNode rootNode, com.klg.jclass.higrid.Aggregate aggregate, com.klg.jclass.higrid.HiGrid grid)
rootNode
- The starting root row node.aggregate
- The aggregate interface.public int getRowCount()
getRowCount
in interface DataTableModel
public int getRowStatus(long bookmark)
getRowStatus
in interface DataTableModel
bookmark
- a long which uniquely identifies this row
public long getRowIdentifier(int row)
getRowIdentifier
in interface DataTableModel
public Object getResultData(long bookmark, String column_identifer) throws DataModelException
getResultData
in interface DataTableModel
bookmark
- a long which uniquely identifies this row
DataModelException
- If getResultData() fails.public com.klg.jclass.datasource.DataTableModel createTable(com.klg.jclass.datasource.DataModelListener originator, long bookmark, TreeNode node) throws DataModelException
createTable
in interface DataTableModel
bookmark
- a long which uniquely identifies a roworiginator
- the DataModelListener which initiated this action
DataModelException
- If createTable() fails.getTable(long, javax.swing.tree.TreeNode)
public com.klg.jclass.datasource.DataTableModel getTable(long bookmark, TreeNode node)
getTable
in interface DataTableModel
bookmark
- a long which uniquely identifies a row
createTable(com.klg.jclass.datasource.DataModelListener, long, javax.swing.tree.TreeNode)
public com.klg.jclass.datasource.MetaDataModel getMetaData()
getMetaData
in interface DataTableModel
public long getParentBookmark()
getParentBookmark
in interface DataTableModel
getRootAncestorBookmark(long)
,
getAncestors(java.util.Vector)
public void deleteRow(com.klg.jclass.datasource.DataModelListener originator, long bookmark) throws DataModelException
deleteRow
in interface DataTableModel
bookmark
- a unique long indicating the row to be deleted.originator
- the DataModelListener which initiated this action
DataModelException
- If logical delete fails.public void updateCell(com.klg.jclass.datasource.DataModelListener originator, long bookmark, String column_identifer, Object value) throws DataModelException
updateCell
in interface DataTableModel
bookmark
- a unique long indicating in which row
the change was madecolumn_identifer
- a unique String indicating in which
column the change occurred.value
- the Object to be placed in the celloriginator
- the DataModelListener which initiated this action
DataModelException
- If error occurs updating a cell.DataTableAbstractionLayer.setValueAt(long, java.lang.String, java.lang.Object)
public boolean commitRow(com.klg.jclass.datasource.DataModelListener originator, long bookmark) throws DataModelException
commitRow
in interface DataTableModel
bookmark
- a unique long indicating which row
to commit to the datasource.originator
- the DataModelListener which initiated this action
DataModelException
- If commit fails.DataTableAbstractionLayer.saveRow(long)
public void commitAll(com.klg.jclass.datasource.DataModelListener originator) throws DataModelException
commitAll
in interface DataTableModel
originator
- the DataModelListener which initiated this action
DataModelException
- If any row fails to commit.DataModel.updateAll(com.klg.jclass.datasource.DataModelListener)
public void conditionallyCommitYourselfAndChildren(com.klg.jclass.datasource.DataModelListener originator)
conditionallyCommitYourselfAndChildren
in interface DataTableModel
originator
- the DataModelListener which initiated this actionpublic void cancelRowChanges(com.klg.jclass.datasource.DataModelListener originator, long bookmark) throws DataModelException
cancelRowChanges
in interface DataTableModel
bookmark
- a unique long indicating which row to uncommit.originator
- the DataModelListener which initiated this action
DataModelException
- If an exception occurs while canceling uncommitted rows.DataTableAbstractionLayer.restoreRow(long)
,
DataTableModel.requeryRow(com.klg.jclass.datasource.DataModelListener, long)
public void cancelAllRowChanges(com.klg.jclass.datasource.DataModelListener originator) throws DataModelException
cancelAllRowChanges
in interface DataTableModel
originator
- the DataModelListener which initiated this action
DataModelException
- If an exception occurs while canceling uncommitted rows.public void rollbackTransaction()
public long getRootAncestorBookmark(long bookmark)
getRootAncestorBookmark
in interface DataTableModel
bookmark
- a unique long for which the ultimate
ancestor bookmark is to be determined
getAncestors(java.util.Vector)
public void getAncestors(Vector ancestors)
getAncestors
in interface DataTableModel
ancestors
- the Vector to be populated with
ancestor bookmarks
public void requeryRowAndDetails(com.klg.jclass.datasource.DataModelListener originator, long bookmark) throws DataModelException
requeryRowAndDetails
in interface DataTableModel
originator
- the DataModelListener which initiated this action
DataModelException
- If requery from server fails.public void requeryRow(com.klg.jclass.datasource.DataModelListener originator, long bookmark) throws DataModelException
DataTableModel
requeryRow
in interface DataTableModel
originator
- the DataModelListener which initiated this actionbookmark
- a long which uniquely identifies a row
DataModelException
- If requery from server fails.public com.klg.jclass.datasource.DataTableModel requeryLevel()
requeryLevel
in interface DataTableModel
public boolean first()
first
in interface DataTableModel
public boolean last()
last
in interface DataTableModel
public boolean next()
next
in interface DataTableModel
public boolean previous()
previous
in interface DataTableModel
public void beforeFirst()
beforeFirst
in interface DataTableModel
public void afterLast()
afterLast
in interface DataTableModel
public boolean isBeforeFirst()
isBeforeFirst
in interface DataTableModel
public boolean isAfterLast()
isAfterLast
in interface DataTableModel
DataTableModel.getCurrentBookmark()
public void relative(int rows) throws DataModelException
relative
in interface DataTableModel
DataModelException
- If move fails.DataTableModel.getCurrentBookmark()
public void absolute(int ordinal_position) throws DataModelException
absolute
in interface DataTableModel
ordinal_position
- an int indicating to which row to move.
DataModelException
- If the operation fails.DataTableModel.getCurrentBookmark()
public long getCurrentBookmark()
getCurrentBookmark
in interface DataTableModel
DataTableModel.first()
,
DataTableModel.last()
,
DataTableModel.next()
,
DataTableModel.previous()
,
DataTableModel.beforeFirst()
,
DataTableModel.afterLast()
,
DataTableModel.isBeforeFirst()
,
DataTableModel.isAfterLast()
,
DataTableModel.relative(int)
,
DataTableModel.absolute(int)
,
DataModel.moveToRow(com.klg.jclass.datasource.DataModelListener, com.klg.jclass.datasource.DataTableModel, long)
public Object getUserData(Object user)
getUserData
in interface DataTableModel
user
- an Object, a reference to the user.
public void setUserData(Object user, Object data)
setUserData
in interface DataTableModel
user
- an Object, a reference to the user.data
- an Object, an arbitrary reference to an Object.public void processEventQueue(com.klg.jclass.datasource.DataModelListener originator) throws DataModelException
processEventQueue
in interface DataTableModel
originator
- the DataModelListener which initiated this action
DataModelException
- If an exception occurs while processing.public void clearEventQueue()
clearEventQueue
in interface DataTableModel
public void moveCursorToRow(long bookmark) throws DataModelException
moveCursorToRow
in interface DataTableModel
bookmark
- a long which uniquely identifies a row
DataModelException
- If move fails.public int getCursor()
getCursor
in interface DataTableModel
public int getRowIndex(long bookmark)
getRowIndex
in interface DataTableModel
bookmark
- a long which uniquely identifies a row
public void deleteCacheChildren(com.klg.jclass.datasource.DataModelListener originator) throws DataModelException
deleteCacheChildren
in interface DataTableModel
DataModelException
- If an exception occurs while deleting the subtree.MetaDataModel.getCacheChildren()
public Object getInternalData(Object user)
getInternalData
in interface DataTableModel
user
- an Object, a reference to the user.
public void setInternalData(Object user, Object data)
setInternalData
in interface DataTableModel
user
- an Object, a reference to the user.data
- an Object, an arbitrary reference to an Object.public void moveToRow(long bookmark)
DataTableModel
moveToRow
in interface DataTableModel
bookmark
- a long which uniquely identifies a row.public boolean isSubTreeModified(long subTreeRootBookmark)
isSubTreeModified
in interface DataTableModel
subTreeRootBookmark
- a long, the bookmark of the row which is
the root of the subtree to be checked.
public void commitSubTree(com.klg.jclass.datasource.DataModelListener originator, long subTreeRootBookmark)
commitSubTree
in interface DataTableModel
subTreeRootBookmark
- a long, the bookmark of the row which is
the root of the subtree to be checked.originator
- the DataModelListener which initiated this actionpublic boolean isModified()
isModified
in interface DataTableModel
public long[] getUpdatedRowBookmarks()
getUpdatedRowBookmarks
in interface DataTableModel
public long[] getInsertedRowBookmarks()
getInsertedRowBookmarks
in interface DataTableModel
public long[] getDeletedRowBookmarks()
getDeletedRowBookmarks
in interface DataTableModel
public boolean isTableOrChildrenModified()
isTableOrChildrenModified
in interface DataTableModel
public boolean tableIsAncestor(com.klg.jclass.datasource.DataTableModel table2)
tableIsAncestor
in interface DataTableModel
table2
- a DataTable which may be an ancestor
public long addRow(com.klg.jclass.datasource.DataModelListener originator) throws DataModelException
Fires BEFORE_INSERT_ROW and upon a successful row add AFTER_INSERT_ROW.
addRow
in interface DataTableModel
originator
- the DataModelListener which initiated this action
DataModelException
- If row fails to be added.public long addRow(com.klg.jclass.datasource.DataModelListener originator, Object row, int status) throws DataModelException
Fires BEFORE_INSERT_ROW and upon a successful row add AFTER_INSERT_ROW.
addRow
in interface DataTableModel
row
- an Object as defined by the interface, but used as an array
by this implementation.status
- an int, one of,
DataModelException
- If row fails to be added.public long addRow(com.klg.jclass.datasource.DataModelListener originator, Object row) throws DataModelException
Fires BEFORE_INSERT_ROW and upon a successful row add AFTER_INSERT_ROW.
addRow
in interface DataTableModel
originator
- the DataModelListener which initiated this actionrow
- an Object as defined by the interface, but used as an array
by this implementation.
DataModelException
- If row fails to be added.public long addRow(com.klg.jclass.datasource.DataModelListener originator, Object row, int status, int ordinal) throws DataModelException
Fires BEFORE_INSERT_ROW and upon a successful row add AFTER_INSERT_ROW.
addRow
in interface DataTableModel
row
- an Object as defined by the interface, but used as an array
by this implementation.status
- an int, one of,
ordinal
- the index position into which the row should be inserted
DataModelException
- If row fails to be added.public Object createNewRow()
createNewRow
in interface DataTableModel
public void requeryTable(com.klg.jclass.datasource.DataModelListener originator) throws DataModelException
requeryTable
in interface DataTableModel
originator
- the DataModelListener which initiated this action
DataModelException
- If requery fails.
|
Copyright © 2004 Quest Software Inc.. All rights reserved. |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |