JClass DesktopViews 6.3.0 API
Documentation

com.klg.jclass.datasource.util
Class NavigatorDataBinding

java.lang.Object
  |
  +--com.klg.jclass.datasource.util.DataBinding
        |
        +--com.klg.jclass.datasource.util.NavigatorDataBinding
All Implemented Interfaces:
DataModelListener, EventListener, ReadOnlyBindingListener, Serializable

public abstract class NavigatorDataBinding
extends DataBinding

An abstract class extending DataBinding with data manipulation functionality.

See Also:
Serialized Form

Field Summary
 
Fields inherited from class com.klg.jclass.datasource.util.DataBinding
binding, component, dataBinding, PATH_DELIMITER, SOURCE_DELIMITER
 
Constructor Summary
NavigatorDataBinding(Component component)
          Creates a new NavigatorDataBinding object for the the given componenet.
NavigatorDataBinding(Component component, com.klg.jclass.datasource.Binding binding)
          Creates a new NavigatorDataBinding object which has to bind the componenet to the given data model and metadata level.
 
Method Summary
 boolean addRow()
          Inserts a new row into the data source and moved the data source current row to the end of the table.
 boolean cancelAll()
          Recursively cancels all uncommited rows.
 boolean cancelRow()
          Cancels all the changes made for the current row in the data source.
 boolean cancelRows(int row, int number)
          Cancels all the changes made for the specified number of rows starting with given row index in the data source.
 boolean commitAll()
          Commits all the changes made in the data source.
 boolean commitRow()
          Commits all the changes made for the current row in the data source.
 boolean commitRows(int row, int number)
          Commits all the changes made for the specified number of rows starting with given row index in the data source.
 boolean deleteRow()
          Deletes current row from the data source.
 boolean deleteRows(int row, int number)
          Deletes specified number of rows starting with given row index from the data source.
 Object getResultData(int row, int column)
          Returns the value for the specified location.
 int getRowStatus(int row)
          Returns the status of the row.
 Object getTableRowLabel(int row)
          Returns the value for the row label at the specified row.
 boolean isAvailable()
          Returns true if the component is bound to the datasource and data are available.
 boolean isEnabled()
          Returns true if the component is bound to the datasource.
 boolean isRowModified(int row)
          Returns true if the row has been modified.
 boolean requeryAll()
          Requeries all data tables in the data source.
 boolean requeryLevel()
          Requeries a level if the data source table is available or all otherwise.
 boolean requeryRow()
          Requeries the current row in the data source.
 boolean requeryRowAndDetails()
          Requeries the current row and detail tables in the data source.
 boolean requeryRows(int row, int number)
          Requeries specified number of rows starting with given row index in the data source.
 boolean requeryRowsAndDetails(int row, int number)
          Requeries rows and detail tables for specified number of rows starting with given row index from the data source.
protected  void setDataAvailable(boolean state)
          Called whenever the DataTableModel changes to an invalid or valid state.
 boolean updateCell(Object value, int row, int column)
          Set the value in the data source.
 
Methods inherited from class com.klg.jclass.datasource.util.DataBinding
afterChangeOfRowData, afterDeleteRow, afterInsertRow, afterMoveToCurrentRow, afterRequeryRowAndDetails, afterRequeryTable, afterReset, beforeCancelAll, beforeCancelRowChanges, beforeCommitAll, beforeCommitConditional, beforeCommitRow, beforeCurrentRowChange, beforeDeleteRow, beforeDeleteTable, beforeEditCell, beforeInsertRow, beforeMoveToCurrentRow, beforeRequery, beforeReset, beginEvents, cellDataChanged, checkDataTableChanged, checkDataTableChanged, currentRowChanged, dispose, endEvents, finalize, getBinding, getComponent, getCurrentRowIndex, getDataBinding, getJavaColumnType, getNativeMetaData, getNumColumns, getNumRows, getTableColumnLabel, handleCancellingBeforeEvents, handleCheckingAfterEvents, initialize, isColumnEditable, isDataAvailable, moveToBestRowAfterDelete, moveToRowIndex, originatorNavigateRow, processException, rowDataChanged, rowDeleted, rowInserted, setDataBinding, setDataBinding, setDataBinding, setDataBinding, setDataBindingInternalBegin, setDataBindingInternalEnd, tableChanged, toggleDataAvailableState
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NavigatorDataBinding

public NavigatorDataBinding(Component component)
Creates a new NavigatorDataBinding object for the the given componenet.

Parameters:
component - data-aware component instance

NavigatorDataBinding

public NavigatorDataBinding(Component component,
                            com.klg.jclass.datasource.Binding binding)
Creates a new NavigatorDataBinding object which has to bind the componenet to the given data model and metadata level.

Parameters:
component - data-aware component instance
Method Detail

addRow

public boolean addRow()
Inserts a new row into the data source and moved the data source current row to the end of the table.

Returns:
false if insert fails by any reason. Must not be called if the data are not available.

deleteRow

public boolean deleteRow()
Deletes current row from the data source.

Returns:
false if the current row is undefined in the data source or delete fails by any reason.

deleteRows

public boolean deleteRows(int row,
                          int number)
Deletes specified number of rows starting with given row index from the data source.

Returns:
false if the set of rows is empty or delete fails by any reason. Must not be called if the data are not available.

requeryRow

public boolean requeryRow()
Requeries the current row in the data source.

Returns:
false if the current row is undefined in the data source or requery fails by any reason.

requeryRows

public boolean requeryRows(int row,
                           int number)
Requeries specified number of rows starting with given row index in the data source.

Returns:
false if the set of rows is empty or requery fails by any reason. Must not be called if the data are not available.

requeryRowAndDetails

public boolean requeryRowAndDetails()
Requeries the current row and detail tables in the data source. Deletes all child nodes then calls requeryRow().

Returns:
false if the current row is undefined in the data source or requery fails by any reason.

requeryRowsAndDetails

public boolean requeryRowsAndDetails(int row,
                                     int number)
Requeries rows and detail tables for specified number of rows starting with given row index from the data source. Deletes all child nodes then calls requeryRow().

Returns:
false if the set of rows is empty or requery fails by any reason. Must not be called if the data are not available.

requeryAll

public boolean requeryAll()
Requeries all data tables in the data source.

Returns:
false if requery fails by any reason.

cancelRow

public boolean cancelRow()
Cancels all the changes made for the current row in the data source.

Returns:
false if the current row is undefined in the data source or cancel fails by any reason.

cancelRows

public boolean cancelRows(int row,
                          int number)
Cancels all the changes made for the specified number of rows starting with given row index in the data source.

Returns:
false if the set of rows is empty or cancel fails by any reason. Must not be called if the data are not available.

cancelAll

public boolean cancelAll()
Recursively cancels all uncommited rows. Restores original cell values for each uncommited row, for new rows remove them.

Returns:
false if cancel fails by any reason.

commitRow

public boolean commitRow()
Commits all the changes made for the current row in the data source.

Returns:
false if the current row is undefined in the data source or commit fails by any reason.

commitRows

public boolean commitRows(int row,
                          int number)
Commits all the changes made for the specified number of rows starting with given row index in the data source.

Returns:
false if the set of rows is empty or commit fails by any reason. Must not be called if the data are not available.

commitAll

public boolean commitAll()
Commits all the changes made in the data source.

Returns:
false if commit fails by any reason.

getTableRowLabel

public Object getTableRowLabel(int row)
Returns the value for the row label at the specified row. Labels use the CellData interface just like cells do. Must not be called if the data are not available.


getResultData

public Object getResultData(int row,
                            int column)
Returns the value for the specified location. Must not be called if the data are not available.


updateCell

public boolean updateCell(Object value,
                          int row,
                          int column)
Set the value in the data source. Must not be called if the data are not available.


isRowModified

public boolean isRowModified(int row)
Returns true if the row has been modified. Must not be called if the data are not available.


getRowStatus

public int getRowStatus(int row)
Returns the status of the row. Must not be called if the data are not available.


requeryLevel

public boolean requeryLevel()
Requeries a level if the data source table is available or all otherwise.

Returns:
false if requery fails by any reason. Must not be called if the data source is disabled.

setDataAvailable

protected void setDataAvailable(boolean state)
Called whenever the DataTableModel changes to an invalid or valid state.

Specified by:
setDataAvailable in class DataBinding

isEnabled

public boolean isEnabled()
Returns true if the component is bound to the datasource.


isAvailable

public boolean isAvailable()
Returns true if the component is bound to the datasource and data are available.


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