|
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.BaseMetaData
Base implementation of MetaDataModel.
| Field Summary | |
protected com.klg.jclass.datasource.BindingModel |
binding
|
protected int |
bufferSize
|
protected boolean |
cacheChildren
|
protected Vector |
columns
|
protected int |
commitPolicy
|
protected static int |
counter
|
protected long |
currentBookmark
|
protected com.klg.jclass.datasource.DataTableModel |
currentDataTable
|
protected com.klg.jclass.datasource.DataModel |
dataModel
|
protected Hashtable |
deletePermissions
|
protected String |
description
|
protected Hashtable |
idxToColumnMap
|
protected int |
initialHashtableSize
|
protected Hashtable |
insertPermissions
|
protected int |
maxRows
|
protected int |
metaDataID
|
protected com.klg.jclass.datasource.ProviderModel |
provider
|
protected boolean |
showDeletedRows
|
protected Class |
storeClass
|
protected Hashtable |
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 | |
BaseMetaData(com.klg.jclass.datasource.DataModel dataModel)
Constructor |
|
| Method Summary | |
void |
addColumn(com.klg.jclass.datasource.ColumnModel column)
Adds a column to the list of column objects. |
void |
clear()
For internal use only. |
void |
commitTransaction()
Commits transaction: does nothing here, so it must be overridden. |
byte[] |
createByteArrayFromBinaryStream(InputStream is)
Returns a byte array created from an input stream. |
boolean |
getAutoCommit()
Default implementation: returns true. |
com.klg.jclass.datasource.BindingModel |
getBinding()
Return the BindingModel for this level, creating it if it doesn't already exist. |
int |
getBufferSize()
Returns the buffer size used for reading binary data, in bytes. |
boolean |
getCacheChildren()
Returns a boolean flag indicating whether subtrees of DataTables rooted at this level are eligible for deletion. |
int |
getColumnCount()
Returns number of columns in this result set. |
String |
getColumnIdentifier(int column_index)
Returns a string that uniquely identifies this column. |
int |
getColumnIndex(String name)
Given a column name, gets its index. |
Hashtable |
getColumnMap()
Returns the list which associates an ordinal position with a column name. |
com.klg.jclass.datasource.ColumnModel |
getColumnObject(String col_id)
Returns the |
Vector |
getColumnObjects()
Returns the list of ColumnModel objects. |
int |
getCommitPolicy()
Returns the commit policy for this level. |
long |
getCurrentBookmark()
Returns the bookmark of the row currently in focus. |
com.klg.jclass.datasource.DataTableModel |
getCurrentDataTable()
Returns the data table which currently has focus. |
com.klg.jclass.datasource.DataModel |
getDataModel()
Returns the |
boolean |
getDeleteAllowed(String table)
Returns true if this table can be deleted. |
String |
getDescription()
Returns the user-assigned description of this instance, or "" if the description has not been set. |
boolean |
getInsertAllowed(String table)
Returns true if this table can be inserted into. |
int |
getJavaColumnType(String column_identifier)
Returns the Java type for a column, one of MetaDataModel type constants. |
int |
getMaxRows()
Returns the maximum number of rows which can be returned by a query. |
int |
getMetaID()
Returns an int that uniquely identifies this instance of the |
Object |
getNativeMetaData()
Returns the native meta-data object: must be overriden. |
com.klg.jclass.datasource.ProviderModel |
getProvider()
Get the provider (if any) for this level. |
boolean |
getShowDeletedRows()
Returns whether logically deleted rows should be shown. |
Class |
getStoreClass()
Return the class responsible for data storage and retrieval (implements StoreModel). |
boolean |
getUpdateAllowed(String table)
Returns true if this table can be updated. |
boolean |
isUpdateAllowedOnColumn(String column)
Do permissions on the model allow this column to be editied? Returns true in the base implementation. |
void |
rollbackTransaction()
Rolls back the transaction: does nothing here, so it. |
void |
setAutoCommit(boolean value)
Default implementation: does nothing. |
void |
setBinding(com.klg.jclass.datasource.BindingModel binding)
Set the Binding object associated with this MetaData level. |
void |
setBufferSize(int bufferSize)
Binary data (BINARY, VARBINARY, LONGVARBINARY) will be read in chunks of this size. |
void |
setCacheChildren(boolean cacheChildren)
Sets a boolean indicating whether subtrees of |
void |
setCommitPolicy(int commit_policy)
Sets the commit policy for this level. |
void |
setCurrentBookmark(long currentBookmark)
|
void |
setCurrentDataTable(com.klg.jclass.datasource.DataTableModel currentDataTable)
|
void |
setDeleteAllowed(String table,
boolean v)
Sets a boolean indicating whether rows in this table may be deleted. |
void |
setDescription(String description)
Sets the user-assigned description of this instance. |
void |
setInsertAllowed(String table,
boolean v)
Sets a boolean indicating whether this table allows inserts. |
void |
setMaxRows(int maxRows)
Sets the maximum number of rows a query at this level can return. |
void |
setMetaID(int metaDataID)
For internal use only. |
void |
setProviderClassName(String providerModelClassName)
Set the ProviderModel class name which will provide data for this level. |
void |
setShowDeletedRows(boolean value)
Indicates whether logically deleted rows showld be shown. |
void |
setStoreClass(String storeClassName)
Set an alternate class to handle data storage and retrieval responsibilities. |
void |
setUpdateAllowed(String table,
boolean v)
Sets a boolean indicating whether updates are allowed in the table mentioned in the first parameter. |
| 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 |
| Methods inherited from interface javax.swing.tree.TreeNode |
children, getAllowsChildren, getChildAt, getChildCount, getIndex, getParent, isLeaf |
| Field Detail |
protected com.klg.jclass.datasource.DataModel dataModel
protected String description
protected Hashtable insertPermissions
protected Hashtable updatePermissions
protected Hashtable deletePermissions
protected Hashtable idxToColumnMap
protected Vector columns
protected int commitPolicy
protected Class storeClass
protected int initialHashtableSize
protected int metaDataID
protected static int counter
protected int maxRows
protected boolean cacheChildren
protected boolean showDeletedRows
protected transient com.klg.jclass.datasource.DataTableModel currentDataTable
protected long currentBookmark
protected int bufferSize
protected com.klg.jclass.datasource.BindingModel binding
protected com.klg.jclass.datasource.ProviderModel provider
| Constructor Detail |
public BaseMetaData(com.klg.jclass.datasource.DataModel dataModel)
| Method Detail |
public void setInsertAllowed(String table,
boolean v)
setInsertAllowed in interface MetaDataModeltable - a String name of the table
public void setUpdateAllowed(String table,
boolean v)
setUpdateAllowed in interface MetaDataModeltable - a String name of the table
public void setDeleteAllowed(String table,
boolean v)
setDeleteAllowed in interface MetaDataModeltable - a String name of the tablepublic boolean getInsertAllowed(String table)
getInsertAllowed in interface MetaDataModeltable - a String name of the table
public boolean getUpdateAllowed(String table)
getUpdateAllowed in interface MetaDataModeltable - a String name of the table
public boolean getDeleteAllowed(String table)
getDeleteAllowed in interface MetaDataModeltable - a String name of the table
public com.klg.jclass.datasource.DataModel getDataModel()
DataModelwhich encapsulates this
MetaDataModel.
getDataModel in interface MetaDataModelpublic int getMetaID()
MetaDataModel. This id is automatically generated.
getMetaID in interface MetaDataModelMetaDataModel.setMetaID(int)public void setMetaID(int metaDataID)
setMetaID in interface MetaDataModelmetaDataID - an int which is the unique id for this instancegetMetaID()public String getDescription()
getDescription in interface MetaDataModelpublic void setDescription(String description)
setDescription in interface MetaDataModeldescription - a String which describles this instance.
public boolean getAutoCommit()
throws DataModelException
getAutoCommit in interface MetaDataModelDataModelException - If the operation fails.commitTransaction(),
rollbackTransaction()
public void setAutoCommit(boolean value)
throws DataModelException
DataTableConnectionobject in the case of jdbc. Sets the auto commit flag. If the underlying data source supports transactions and this flag is set to false, a transaction will wrap data modifications. The default is to not attempt to wrap modifications in a transaction.
setAutoCommit in interface MetaDataModelvalue - a boolean, true if transactions are to be used,
false otherwise.
DataModelException - If the operation fails.
public void rollbackTransaction()
throws DataModelException
rollbackTransaction in interface MetaDataModelDataModelException - If rollback fails.MetaDataModel.getAutoCommit()
public void commitTransaction()
throws DataModelException
commitTransaction in interface MetaDataModelDataModelException - If commit fails.
public void setCommitPolicy(int commit_policy)
throws DataModelException
Commit policy cannot be set to COMMIT_LEAVING_RECORD if getShowDeltedRows() returns false.
setCommitPolicy in interface MetaDataModelcommit_policy - an int, one of COMMIT_LEAVING_RECORD,
COMMIT_LEAVING_PARENT, or COMMIT_MANUALLY
DataModelException - If set fails.getShowDeletedRows()public int getCommitPolicy()
getCommitPolicy in interface MetaDataModelpublic Vector getColumnObjects()
getColumnObjects in interface MetaDataModelColumnModelpublic int getColumnCount()
getColumnCount in interface MetaDataModel
public void addColumn(com.klg.jclass.datasource.ColumnModel column)
throws DataModelException
addColumn in interface MetaDataModelDataModelException - If duplicate column found.ColumnModel
public String getColumnIdentifier(int column_index)
throws DataModelException
getColumnIdentifier in interface MetaDataModelcolumn_index - an int indicating for which column
a unique identifier should be returned.
DataModelException - If getColumnIdentifier fails.
public int getJavaColumnType(String column_identifier)
throws DataModelException
getJavaColumnType in interface MetaDataModelcolumn_identifier - an String uniquely identifying a column
DataModelException - If getJavaColumnType fails.MetaDataModel
public com.klg.jclass.datasource.ColumnModel getColumnObject(String col_id)
throws DataModelException
ColumnModelfor the given column.
getColumnObject in interface MetaDataModelcol_id - a String which uniquely identifies a column
DataModelException - If get fails.
public int getColumnIndex(String name)
throws DataModelException
getColumnIndex in interface MetaDataModelDataModelException - If the operation fails.public Hashtable getColumnMap()
public Object getNativeMetaData()
getNativeMetaData in interface MetaDataModel
public boolean isUpdateAllowedOnColumn(String column)
throws DataModelException
isUpdateAllowedOnColumn in interface MetaDataModelDataModelException - If primary keys cannot be determined.setUpdateAllowed(java.lang.String, boolean),
getUpdateAllowed(java.lang.String)public void clear()
clear in interface MetaDataModel
public void setShowDeletedRows(boolean value)
throws DataModelException
setShowDeletedRows in interface MetaDataModelvalue - a boolean: true to show rows, false otherwise
DataModelException - If set fails.public boolean getShowDeletedRows()
getShowDeletedRows in interface MetaDataModelsetShowDeletedRows(boolean),
setCommitPolicy(int)public void setMaxRows(int maxRows)
Does not apply to ide-specific implmentations. Set the max rows directly on the ide data object instead.
setMaxRows in interface MetaDataModelmaxRows - an int indicating the max rows to be returnedgetMaxRows()public int getMaxRows()
Does not apply to ide-specific implmentations. Set the max rows directly on the ide data object instead.
getMaxRows in interface MetaDataModelsetMaxRows(int)public void setCacheChildren(boolean cacheChildren)
DataTablesrooted at this level are eligible for deletion. The default is false, meaning
DataTableModel.deleteCacheChildrenshould be called when a subtree is collapsed.
setCacheChildren in interface MetaDataModelcacheChildren - a boolean: true means children should be cached, false
means dateCacheChildren should be called when a tree is collapsed.getCacheChildren(),
DataTableModel.deleteCacheChildren(com.klg.jclass.datasource.DataModelListener)public boolean getCacheChildren()
getCacheChildren in interface MetaDataModelsetCacheChildren(boolean),
DataTableModel.deleteCacheChildren(com.klg.jclass.datasource.DataModelListener)public com.klg.jclass.datasource.DataTableModel getCurrentDataTable()
getCurrentDataTable in interface MetaDataModelpublic long getCurrentBookmark()
getCurrentBookmark in interface MetaDataModelpublic void setCurrentDataTable(com.klg.jclass.datasource.DataTableModel currentDataTable)
setCurrentDataTable in interface MetaDataModelpublic void setCurrentBookmark(long currentBookmark)
setCurrentBookmark in interface MetaDataModel
public byte[] createByteArrayFromBinaryStream(InputStream is)
throws DataModelException
DataModelException - If the operation fails.public void setBufferSize(int bufferSize)
public int getBufferSize()
setBufferSize(int)
public void setStoreClass(String storeClassName)
throws DataModelException
If set, BaseDataTable instances will use this instances of this class rather than the default class ("Store") to store and retrieve data.
setStoreClass in interface MetaDataModelDataModelException - If an error occurs loading the class.StoreModel,
getStoreClass()
public Class getStoreClass()
throws DataModelException
getStoreClass in interface MetaDataModelDataModelException - If storeClass is not set
and an error occurs while trying to load the default class,
com.klg.jclass.datasource.Store.public void setBinding(com.klg.jclass.datasource.BindingModel binding)
setBinding in interface MetaDataModelpublic com.klg.jclass.datasource.BindingModel getBinding()
getBinding in interface MetaDataModelpublic com.klg.jclass.datasource.ProviderModel getProvider()
getProvider in interface MetaDataModelProviderModel.getData(com.klg.jclass.datasource.DataModelListener, long, com.klg.jclass.datasource.MetaDataModel),
DataTableModel.createTable(com.klg.jclass.datasource.DataModelListener, long, javax.swing.tree.TreeNode),
DataTableModel.getTable(long, javax.swing.tree.TreeNode)
public void setProviderClassName(String providerModelClassName)
throws DataModelException
setProviderClassName in interface MetaDataModelDataModelException - if the provider fails
to be instantiated.
|
Copyright © 2004 Quest Software Inc.. All rights reserved. |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||