|
JClass DesktopViews 6.3.0 API Documentation |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
This is the data interface for JClass DataSource. All data for JClass DataSource is maintained and manipulated in this data model through its sub-interfaces. This data model requires the implementation of two tree models, one for describing the relationships of the hierarchical data (MetaDataModel) and one for the actual data (DataTableModel).
Method Summary | |
void |
addDataModelListener(com.klg.jclass.datasource.DataModelListener listener)
Registers a listener for this DataModel. |
void |
cancelAll(com.klg.jclass.datasource.DataModelListener originator)
Cancels all pending changes in all DataTables. |
void |
clearCurrentPath(com.klg.jclass.datasource.MetaDataModel parentMeta)
Clear the current path of all children of this MetaDataModel. |
void |
clearDataTableTreeInternalData(Object user)
For internal use only. |
void |
clearDataTableTreeUserData(Object user)
Clears all user data. |
void |
enableDataModelEvents(boolean value)
Enables or disables data model events. |
boolean |
fireDataModelEvent(com.klg.jclass.datasource.DataModelEvent event)
Passes event on to listeners of this DataModel. |
boolean |
fireDataModelEvent(com.klg.jclass.datasource.DataModelEvent event,
com.klg.jclass.datasource.DataModelListener listener)
Passes event on to a single specific listener of this DataModel. |
Object |
getCurrentDataItem(com.klg.jclass.datasource.DataModelListener originator,
com.klg.jclass.datasource.MetaDataModel myLevel,
String column)
Returns the data item at the specified MetaData level and column for the current row. |
com.klg.jclass.datasource.DataTableModel |
getCurrentDataTable(com.klg.jclass.datasource.DataModelListener originator,
com.klg.jclass.datasource.MetaDataModel myLevel)
Returns the DataTable at the specified MetaData level based on the current bookmark. |
long |
getCurrentGlobalBookmark()
Returns the bookmark of the row which has the global cursor's focus. |
com.klg.jclass.datasource.DataTableModel |
getCurrentGlobalTable()
Returns the DataTableModel currently in focus. |
TreeModel |
getDataTableTree()
Returns a handle to the DataTree. |
boolean |
getEventsEnabled()
Returns true if events are enabled, false otherwise. |
Object |
getListeners()
Returns a list of listeners on this DataModel. |
com.klg.jclass.datasource.MetaDataModel |
getMetaData(String metaDataName)
Gets a MetaDataModel instance by name, or null if not found. |
TreeModel |
getMetaDataTree()
Returns a handle to a TreeModel containing meta-data. |
String |
getModelName()
Gets this model's name |
boolean |
isModified()
Are there any pending modifications in any rows in this entire data model? |
boolean |
moveToRow(com.klg.jclass.datasource.DataModelListener originator,
com.klg.jclass.datasource.DataTableModel data_table,
long bookmark)
Called by observers to tell this data model to which row it should move. |
boolean |
moveToRow(com.klg.jclass.datasource.DataModelListener originator,
com.klg.jclass.datasource.DataTableModel data_table,
long bookmark,
boolean moveIdeCursor)
For internal use only. |
void |
removeDataModelListener(com.klg.jclass.datasource.DataModelListener listener)
Removes a listener on this DataModel. |
void |
requeryAll(com.klg.jclass.datasource.DataModelListener originator)
Requeries all DataTables. |
void |
setModelName(String modelName)
Sets this model's name. |
void |
updateAll(com.klg.jclass.datasource.DataModelListener originator)
Writes all pending changes in all DataTables to the data source. |
Method Detail |
public TreeModel getMetaDataTree()
public TreeModel getDataTableTree()
public void addDataModelListener(com.klg.jclass.datasource.DataModelListener listener)
DataModelListener
public void removeDataModelListener(com.klg.jclass.datasource.DataModelListener listener)
DataModelListener
public boolean moveToRow(com.klg.jclass.datasource.DataModelListener originator, com.klg.jclass.datasource.DataTableModel data_table, long bookmark) throws DataModelException
originator
- the DataModelListener which initiated this actiondata_table
- the DataTable to which the cursor should be movedbookmark
- a long uniquely identify to which row the cursor
should move
DataModelException
- If move to row fails.public boolean moveToRow(com.klg.jclass.datasource.DataModelListener originator, com.klg.jclass.datasource.DataTableModel data_table, long bookmark, boolean moveIdeCursor) throws DataModelException
originator
- the DataModelListener which initiated this actiondata_table
- the DataTable to which the cursor should be movedbookmark
- a long uniquely identify to which row the cursor
should movemoveIdeCursor
- a boolean indicating if this move should also cause
the ide's cursor to move
DataModelException
- If move to row fails.public void updateAll(com.klg.jclass.datasource.DataModelListener originator) throws DataModelException
originator
- the DataModelListener which initiated this action
DataModelException
- If update fails.public void cancelAll(com.klg.jclass.datasource.DataModelListener originator) throws DataModelException
originator
- the DataModelListener which initiated this action
DataModelException
- If changes can't be canceled.public void requeryAll(com.klg.jclass.datasource.DataModelListener originator) throws DataModelException
originator
- the DataModelListener which initiated this action
DataModelException
- If requery fails.public Object getListeners()
public boolean fireDataModelEvent(com.klg.jclass.datasource.DataModelEvent event)
event
- a DataModelEvent
public boolean fireDataModelEvent(com.klg.jclass.datasource.DataModelEvent event, com.klg.jclass.datasource.DataModelListener listener)
event
- a DataModelEventlistener
- the DataModelListener
public void enableDataModelEvents(boolean value)
This is different from the DataModelEvent BEGIN_EVENTS and END_EVENTS events where events are still sent but the listener having received the BEGIN_EVENTS event knows it may choose to disregard the events until the END_EVENTS event is received. They are given the choice.
Temporarily disabling events is more efficient than using the BEGIN/END_EVENTS method since the events are not dispatched to all listeners.
DataModelEvent
,
getEventsEnabled()
public boolean getEventsEnabled()
enableDataModelEvents(boolean)
public void setModelName(String modelName)
modelName
- a String which is to be this model's namepublic String getModelName()
public com.klg.jclass.datasource.DataTableModel getCurrentGlobalTable()
moveToRow(com.klg.jclass.datasource.DataModelListener, com.klg.jclass.datasource.DataTableModel, long)
,
getCurrentGlobalBookmark()
public long getCurrentGlobalBookmark()
moveToRow(com.klg.jclass.datasource.DataModelListener, com.klg.jclass.datasource.DataTableModel, long)
,
getCurrentGlobalTable()
public com.klg.jclass.datasource.DataTableModel getCurrentDataTable(com.klg.jclass.datasource.DataModelListener originator, com.klg.jclass.datasource.MetaDataModel myLevel) throws DataModelException
Will create the table if it does not exist. In this case it will be the child of the current row in the parent, and so on.
originator
- the DataModelListener which initiated this action
DataModelException
- If get fails.public Object getCurrentDataItem(com.klg.jclass.datasource.DataModelListener originator, com.klg.jclass.datasource.MetaDataModel myLevel, String column) throws DataModelException
Will create the table if it does not exist. In this case it will be the child of the current row in the parent, and so on.
originator
- the DataModelListener which initiated this action
DataModelException
- If get fails.public com.klg.jclass.datasource.MetaDataModel getMetaData(String metaDataName)
metaDataName
- a String which is the name of the MetaDataModel object
MetaDataModel.setDescription(java.lang.String)
,
MetaDataModel.getDescription()
public boolean isModified()
public void clearCurrentPath(com.klg.jclass.datasource.MetaDataModel parentMeta)
parentMeta
- the MetaDataModel whose children are to be
cleared.public void clearDataTableTreeUserData(Object user)
user
- an Object, a reference to the user.public void clearDataTableTreeInternalData(Object user)
user
- an Object, a reference to the user.
|
Copyright © 2004 Quest Software Inc.. All rights reserved. |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |