JClass DesktopViews 6.3.0 API
Documentation

com.klg.jclass.datasource
Class IdeMetaData

java.lang.Object
  |
  +--javax.swing.tree.DefaultMutableTreeNode
        |
        +--com.klg.jclass.datasource.DataSourceTreeNode
              |
              +--com.klg.jclass.datasource.BaseMetaData
                    |
                    +--com.klg.jclass.datasource.IdeMetaData
All Implemented Interfaces:
Cloneable, IdeMetaDataModel, MetaDataModel, MutableTreeNode, Serializable, TreeNode
Direct Known Subclasses:
MetaData

public abstract class IdeMetaData
extends BaseMetaData
implements IdeMetaDataModel

Exploits commonality betwee ides.

See Also:
Serialized Form

Field Summary
static long globalBookmarkBeforeLastMove
           
static com.klg.jclass.datasource.DataTableModel globalDataTableBeforeLastMove
           
 
Fields inherited from class com.klg.jclass.datasource.BaseMetaData
binding, bufferSize, cacheChildren, columns, commitPolicy, counter, currentBookmark, currentDataTable, dataModel, deletePermissions, description, idxToColumnMap, initialHashtableSize, insertPermissions, maxRows, metaDataID, provider, showDeletedRows, storeClass, updatePermissions
 
Fields inherited from class javax.swing.tree.DefaultMutableTreeNode
allowsChildren, children, EMPTY_ENUMERATION, parent, userObject
 
Fields inherited from interface com.klg.jclass.datasource.MetaDataModel
COMMIT_LEAVING_ANCESTOR, COMMIT_LEAVING_RECORD, COMMIT_MANUALLY, TYPE_BIG_DECIMAL, TYPE_BOOLEAN, TYPE_BYTE, TYPE_BYTE_ARRAY, TYPE_DOUBLE, TYPE_FLOAT, TYPE_INTEGER, TYPE_LONG, TYPE_OBJECT, TYPE_SHORT, TYPE_SQL_DATE, TYPE_SQL_TIME, TYPE_SQL_TIMESTAMP, TYPE_STRING, TYPE_UTIL_DATE
 
Constructor Summary
IdeMetaData(com.klg.jclass.datasource.DataModel dm)
           
 
Method Summary
 void cleanChildDataSets()
          For internal use only.
protected  void cleanChildDataSets(com.klg.jclass.datasource.IdeMetaData md)
          For internal use only.
protected  boolean handledAsSingleLevelBindingMove()
          handle the non-heirarchical case where the ide has its data sets linked in master-detail relationships and there are jclass components bound in single-level to each master-detail level.
 void handleIDEUpdateCellRequest(com.klg.jclass.datasource.IdeDataTableModel dt, long bookmark)
          We have received an event from the IDE data source telling us that changes applied to a row have been posted.
 void navigated(int row)
          Responds to navigation events from ide underlying data sources.
 void requeryCurrentRowAndBelow(com.klg.jclass.datasource.DataModelListener originator, com.klg.jclass.datasource.DataTableModel dt)
          Requery the current row in this data table and its subtree.
 void setCommitPolicy(int commit_policy)
          Overrides BaseMetaData.setCommitPolicy to only allow COMMIT_LEAVING_RECORD to be selected.
 void turnOffDataModelEvents()
          This simply calls dataModel.enableDataModelEvents() but remembers the previous state.
 void turnOnDataModelEvents()
          If events were originally on turn them back on.
 
Methods inherited from class com.klg.jclass.datasource.BaseMetaData
addColumn, clear, commitTransaction, createByteArrayFromBinaryStream, getAutoCommit, getBinding, getBufferSize, getCacheChildren, getColumnCount, getColumnIdentifier, getColumnIndex, getColumnMap, getColumnObject, getColumnObjects, getCommitPolicy, getCurrentBookmark, getCurrentDataTable, getDataModel, getDeleteAllowed, getDescription, getInsertAllowed, getJavaColumnType, getMaxRows, getMetaID, getNativeMetaData, getProvider, getShowDeletedRows, getStoreClass, getUpdateAllowed, isUpdateAllowedOnColumn, rollbackTransaction, setAutoCommit, setBinding, setBufferSize, setCacheChildren, setCurrentBookmark, setCurrentDataTable, setDeleteAllowed, setDescription, setInsertAllowed, setMaxRows, setMetaID, setProviderClassName, setShowDeletedRows, setStoreClass, setUpdateAllowed
 
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 javax.swing.tree.DefaultMutableTreeNode
add, breadthFirstEnumeration, children, clone, depthFirstEnumeration, getAllowsChildren, getChildAfter, getChildAt, getChildBefore, getChildCount, getDepth, getFirstLeaf, getIndex, getLastLeaf, getLeafCount, getLevel, getNextLeaf, getNextNode, getNextSibling, getParent, getPath, getPathToRoot, getPreviousLeaf, getPreviousNode, getPreviousSibling, getRoot, getSharedAncestor, getSiblingCount, getUserObject, getUserObjectPath, insert, isLeaf, isNodeAncestor, isNodeChild, isNodeDescendant, isNodeRelated, isNodeSibling, isRoot, pathFromAncestorEnumeration, postorderEnumeration, preorderEnumeration, remove, remove, removeAllChildren, removeFromParent, setAllowsChildren, setParent, setUserObject
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface com.klg.jclass.datasource.IdeMetaDataModel
refreshDataSet
 
Methods inherited from interface com.klg.jclass.datasource.MetaDataModel
addColumn, clear, commitTransaction, getAutoCommit, getBinding, getCacheChildren, getColumnCount, getColumnIdentifier, getColumnIndex, getColumnObject, getColumnObjects, getCommitPolicy, getCurrentBookmark, getCurrentDataTable, getDataModel, getDeleteAllowed, getDescription, getInsertAllowed, getJavaColumnType, getMaxRows, getMetaID, getNativeMetaData, getProvider, getShowDeletedRows, getStoreClass, getUpdateAllowed, isUpdateAllowedOnColumn, rollbackTransaction, setAutoCommit, setBinding, setCacheChildren, setCurrentBookmark, setCurrentDataTable, setDeleteAllowed, setDescription, setInsertAllowed, setMaxRows, setMetaID, setProviderClassName, setShowDeletedRows, setStoreClass, setUpdateAllowed
 
Methods inherited from interface javax.swing.tree.TreeNode
children, getAllowsChildren, getChildAt, getChildCount, getIndex, getParent, isLeaf
 

Field Detail

globalBookmarkBeforeLastMove

public static long globalBookmarkBeforeLastMove

globalDataTableBeforeLastMove

public static com.klg.jclass.datasource.DataTableModel globalDataTableBeforeLastMove
Constructor Detail

IdeMetaData

public IdeMetaData(com.klg.jclass.datasource.DataModel dm)
Method Detail

navigated

public void navigated(int row)
Responds to navigation events from ide underlying data sources.

Parameters:
row - an int which is the row in the ide

requeryCurrentRowAndBelow

public void requeryCurrentRowAndBelow(com.klg.jclass.datasource.DataModelListener originator,
                                      com.klg.jclass.datasource.DataTableModel dt)
Requery the current row in this data table and its subtree.

Parameters:
originator - the DataModelListener which initiated this action
dt - the DataTableModel for which the current row and subtree is to be requeried.

handleIDEUpdateCellRequest

public void handleIDEUpdateCellRequest(com.klg.jclass.datasource.IdeDataTableModel dt,
                                       long bookmark)
We have received an event from the IDE data source telling us that changes applied to a row have been posted.

Parameters:
dt - the IdeDataTableModel in which the change occurred
bookmark - a long which uniquely identifies a row

turnOffDataModelEvents

public void turnOffDataModelEvents()
This simply calls dataModel.enableDataModelEvents() but remembers the previous state. That is, if they were turned off by the user, don't turn them back on.


turnOnDataModelEvents

public void turnOnDataModelEvents()
If events were originally on turn them back on.


cleanChildDataSets

public void cleanChildDataSets()
                        throws DataModelException
For internal use only. Recursively refreshes child dataSets of the root Called by requeryLevel in the root DataTable.

Throws:
DataModelException - If an exception occurs while refreshing the data sets.

cleanChildDataSets

protected void cleanChildDataSets(com.klg.jclass.datasource.IdeMetaData md)
                           throws DataModelException
For internal use only. Called by cleanChildDataSet to do the work.

Throws:
DataModelException - If an exception occurs while refreshing the data sets.

setCommitPolicy

public void setCommitPolicy(int commit_policy)
                     throws DataModelException
Overrides BaseMetaData.setCommitPolicy to only allow COMMIT_LEAVING_RECORD to be selected. This is the only policy currently supported in IDE environments.

Specified by:
setCommitPolicy in interface MetaDataModel
Overrides:
setCommitPolicy in class BaseMetaData
Parameters:
commit_policy - an int, must be COMMIT_LEAVING_RECORD.
Throws:
DataModelException - If set fails.
See Also:
BaseMetaData.getShowDeletedRows()

handledAsSingleLevelBindingMove

protected boolean handledAsSingleLevelBindingMove()
                                           throws Exception
handle the non-heirarchical case where the ide has its data sets linked in master-detail relationships and there are jclass components bound in single-level to each master-detail level. That is, each jclass component does not know about anybody else and they each have their own data model. If this level receives a reset then the parent has navigated, so refresh this level.

Throws:
Exception - If an exception occurs while refreshing the data set.

Copyright © 2004 Quest Software Inc..
All rights reserved.