com.sun.data.provider.impl
Class AbstractTableDataProvider

java.lang.Object
  extended by com.sun.data.provider.impl.AbstractDataProvider
      extended by com.sun.data.provider.impl.AbstractTableDataProvider
All Implemented Interfaces:
DataProvider, TableDataProvider, java.io.Serializable
Direct Known Subclasses:
BasicTransactionalTableDataProvider, CachedRowSetDataProvider, FilteredTableDataProvider, ListDataProvider, ObjectArrayDataProvider, ObjectListDataProvider

public abstract class AbstractTableDataProvider
extends AbstractDataProvider
implements TableDataProvider

Abstract base implementation of TableDataProvider. This class is a convenient base class to use when creating a new TableDataProvider implementation.

See Also:
Serialized Form

Field Summary
protected  RowKey cursorRow
          storage for the current cursor row
protected  java.util.ArrayList rowKeyList
           
protected  java.util.HashMap rowKeyMap
           
protected  TableCursorListener[] tcListeners
          Array of TableCursorListener instances registered for this TableDataProvider.
 
Fields inherited from class com.sun.data.provider.impl.AbstractDataProvider
dpListeners, fieldKeys
 
Constructor Summary
AbstractTableDataProvider()
           
 
Method Summary
 void addTableCursorListener(TableCursorListener listener)
          

Register a new TableCursorListener to this TableDataProvider instance.

 void addTableDataListener(TableDataListener l)
          

Register a new TableDataListener to this TableDataProvider instance.

abstract  RowKey appendRow()
          

Appends a new row at the end of the list and returns the row key for the newly appended row.

abstract  boolean canAppendRow()
          

This method is called to test if this TableDataProvider supports the append operation.

abstract  boolean canInsertRow(RowKey beforeRow)
          

This method is called to test if this TableDataProvider supports resizability.

abstract  boolean canRemoveRow(RowKey row)
          

This method is called to test if this TableDataProvider supports the removeRow operation.

 boolean cursorFirst()
          

Move the cursor to the first row in this TableDataProvider.

 boolean cursorLast()
          

Move the cursor to the last row in this TableDataProvider.

 boolean cursorNext()
          

Move the cursor to the row after the current cursor row, unless the cursor is currently at the last row TableDataProvider.

 boolean cursorPrevious()
          

Move the cursor to the row before the current cursor row, unless the cursor is currently at the first row.

 RowKey[] findAll(FieldKey[] fieldKeys, java.lang.Object[] values)
          Finds all rows with the specified values stored under the specified field keys.
 RowKey[] findAll(FieldKey fieldKey, java.lang.Object value)
          Finds all rows with the specified value stored under the specified field key.
 RowKey[] findAll(java.lang.String[] fieldIds, java.lang.Object[] values)
           
 RowKey[] findAll(java.lang.String fieldId, java.lang.Object value)
           
 RowKey findFirst(FieldKey[] fieldKeys, java.lang.Object[] values)
          Finds the first row with the specified values stored under the specified field keys.
 RowKey findFirst(FieldKey fieldKey, java.lang.Object value)
          Finds the first row with the specified value stored under the specified field key.
 RowKey findFirst(java.lang.String[] fieldIds, java.lang.Object[] values)
           
 RowKey findFirst(java.lang.String fieldId, java.lang.Object value)
           
protected  void fireCursorChanged(RowKey oldRow, RowKey newRow)
          Fires a cursorChanged event to all registered TableCursorListeners
protected  void fireCursorChanging(RowKey oldRow, RowKey newRow)
          Fires a cursorChanging event to all registered TableCursorListeners.
protected  void fireRowAdded(RowKey newRow)
          Fires a rowAdded event to all registered TableDataListeners
protected  void fireRowRemoved(RowKey oldRow)
          Fires a rowRemoved event to all registered TableDataListeners
protected  void fireValueChanged(FieldKey fieldKey, RowKey row, java.lang.Object oldValue, java.lang.Object newValue)
          Fires a valueChanged event to all registered TableDataListeners
 RowKey[] getAllRows()
          Returns all the RowKeys, which may force the underlying dataprovider to go and perform an expensive operation to fetch them.
protected  int getCursorIndex()
           
 RowKey getCursorRow()
          
abstract  int getRowCount()
          
 RowKey getRowKey(java.lang.String rowId)
          Returns a RowKey for the specified rowId.
 RowKey[] getRowKeys(int count, RowKey afterRow)
          Returns an array of RowKey objects representing the requested batch of RowKeys.
 TableCursorListener[] getTableCursorListeners()
          
 TableDataListener[] getTableDataListeners()
          
abstract  java.lang.Class getType(FieldKey fieldKey)
          

Returns the data type of the data element referenced by the specified data key.

 java.lang.Object getValue(FieldKey fieldKey)
          

Returns value of the data element referenced by the specified FieldKey.

abstract  java.lang.Object getValue(FieldKey fieldKey, RowKey row)
          

Return value of the data element referenced by the specified FieldKey and RowKey.

 java.lang.Object getValue(java.lang.String fieldId, RowKey row)
           
abstract  RowKey insertRow(RowKey beforeRow)
          

Inserts a new row at the specified row.

abstract  boolean isReadOnly(FieldKey fieldKey)
          

Return a flag indicating whether the value of the data element represented by the specified FieldKey can be modified via the setValue() method.

 boolean isRowAvailable(RowKey row)
          Returns true if the specified RowKey represents data elements that are supported by this TableDataProvider; otherwise, return false
abstract  void removeRow(RowKey row)
          

Removes the specified row.

 void removeTableCursorListener(TableCursorListener listener)
          

Deregister an existing TableCursorListener from this TableDataProvider instance.

 void removeTableDataListener(TableDataListener l)
          

Deregister an existing TableDataListener from this TableDataProvider instance.

protected  boolean setCursorIndex(int index)
           
 void setCursorRow(RowKey row)
          

Sets the cursor to the row represented by the passed RowKey.

 void setValue(FieldKey fieldKey, java.lang.Object value)
          

Set the value of the data element represented by the specified FieldKey to the specified new value.

abstract  void setValue(FieldKey fieldKey, RowKey row, java.lang.Object value)
          

Sets the value of the data element represented by the specified FieldKey and RowKey to the specified new value.

 void setValue(java.lang.String fieldId, RowKey row, java.lang.Object value)
           
 
Methods inherited from class com.sun.data.provider.impl.AbstractDataProvider
addDataListener, addFieldKey, addFieldKeys, clearFieldKeys, fireProviderChanged, fireValueChanged, getDataListeners, getFakeData, getFakeData, getFieldKey, getFieldKeys, getType, getValue, isReadOnly, removeDataListener, removeFieldKey, removeFieldKeys, setValue, sortFieldKeys
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.sun.data.provider.DataProvider
addDataListener, getDataListeners, getFieldKey, getFieldKeys, removeDataListener
 

Field Detail

rowKeyList

protected java.util.ArrayList rowKeyList

rowKeyMap

protected java.util.HashMap rowKeyMap

cursorRow

protected RowKey cursorRow
storage for the current cursor row


tcListeners

protected TableCursorListener[] tcListeners

Array of TableCursorListener instances registered for this TableDataProvider.

Constructor Detail

AbstractTableDataProvider

public AbstractTableDataProvider()
Method Detail

getType

public abstract java.lang.Class getType(FieldKey fieldKey)
                                 throws DataProviderException

Returns the data type of the data element referenced by the specified data key.

Specified by:
getType in interface DataProvider
Specified by:
getType in class AbstractDataProvider
Parameters:
fieldKey - FieldKey identifying the data element whose type is to be returned
Returns:
the data type of the data element referenced by the specified data key
Throws:
DataProviderException - Implementations may wish to surface internal exceptions (nested in DataProviderException) rather than simply returning null. A DPE may also indicate that the passed fieldKey is not valid. Consult the documentation of the specific DataProvider implementation for details on what exceptions might be wrapped by a DPE.

isReadOnly

public abstract boolean isReadOnly(FieldKey fieldKey)
                            throws DataProviderException

Return a flag indicating whether the value of the data element represented by the specified FieldKey can be modified via the setValue() method.

Specified by:
isReadOnly in interface DataProvider
Specified by:
isReadOnly in class AbstractDataProvider
Parameters:
fieldKey - FieldKey identifying the data element whose settable status is to be returned
Returns:
a flag indicating whether the value of the data element represented by the specified FieldKey can be modified via the setValue() method
Throws:
DataProviderException - Implementations may wish to surface internal exceptions (nested in DataProviderException) rather than simply returning true. A DPE may also indicate that the passed fieldKey is not valid. Consult the documentation of the specific DataProvider implementation for details on what exceptions might be wrapped by a DPE.

getRowCount

public abstract int getRowCount()
                         throws DataProviderException

Specified by:
getRowCount in interface TableDataProvider
Returns:
the number of rows represented by this TableDataProvider if this information is available; otherwise, return -1 (indicating unknown row count)
Throws:
DataProviderException - Implementations may wish to surface internal exceptions (nested in DataProviderException) rather than simply returning -1. Consult the documentation of the specific TableDataProvider implementation for details on what exceptions might be wrapped by a DPE.

getValue

public abstract java.lang.Object getValue(FieldKey fieldKey,
                                          RowKey row)
                                   throws DataProviderException

Return value of the data element referenced by the specified FieldKey and RowKey.

Specified by:
getValue in interface TableDataProvider
Parameters:
fieldKey - FieldKey identifying the data element whose value is to be returned
row - RowKey identifying the data row whose value is to be returned
Returns:
value of the data element referenced by the specified FieldKey and RowKey
Throws:
DataProviderException - Implementations may wish to surface internal exceptions (nested in DataProviderException) rather than simply returning null. A DPE may also indicate that this FieldKey or RowKey does not represent a data element provided by this TableDataProvider. Consult the documentation of the specific TableDataProvider implementation for details on what exceptions might be wrapped by a DPE.

setValue

public abstract void setValue(FieldKey fieldKey,
                              RowKey row,
                              java.lang.Object value)
                       throws DataProviderException

Sets the value of the data element represented by the specified FieldKey and RowKey to the specified new value.

Specified by:
setValue in interface TableDataProvider
Parameters:
fieldKey - FieldKey identifying the data element whose value is to be modified
row - RowKey indentifying the data row whose value is to be modified
value - New value for this data element
Throws:
DataProviderException - Implementations may wish to surface internal exceptions (nested in DataProviderException). A DPE may also indicate that this FieldKey or RowKey does not represent a data element provided by this TableDataProvider. Consult the documentation of the specific TableDataProvider implementation for details on what exceptions might be wrapped by a DPE.

canInsertRow

public abstract boolean canInsertRow(RowKey beforeRow)
                              throws DataProviderException

This method is called to test if this TableDataProvider supports resizability. If objects can be inserted and removed from the list, this method should return true. If the data provider is not resizable, this method should return false.

The following methods will only be called if this method returns true:

Specified by:
canInsertRow in interface TableDataProvider
Parameters:
beforeRow - The desired location to insert the new row in front of
Returns:
true if the data provider is resizable, or false if not.
Throws:
DataProviderException - Implementations may wish to surface internal exceptions (nested in DataProviderException) rather than simply returning false. A DPE may also indicate that this RowKey does not represent a row provided by this TableDataProvider. Consult the documentation of the specific TableDataProvider implementation for details on what exceptions might be wrapped by a DPE.
See Also:
TableDataProvider.insertRow(RowKey)

insertRow

public abstract RowKey insertRow(RowKey beforeRow)
                          throws DataProviderException

Inserts a new row at the specified row.

NOTE: The method should only be called after testing the canInsertRow(RowKey beforeRow) to see if this TableDataProvider supports resizing.

Specified by:
insertRow in interface TableDataProvider
Parameters:
beforeRow - The desired location to insert the new row in front of
Returns:
A RowKey representing the address of the newly inserted row
Throws:
DataProviderException - Implementations may wish to surface internal exceptions (nested in DataProviderException). A DPE may also indicate that this RowKey does not represent a row provided by this TableDataProvider. Consult the documentation of the specific TableDataProvider implementation for details on what exceptions might be wrapped by a DPE.
See Also:
TableDataProvider.canInsertRow(RowKey)

canAppendRow

public abstract boolean canAppendRow()
                              throws DataProviderException

This method is called to test if this TableDataProvider supports the append operation. If rows can be appended to the list, this method should return true. If the data provider is not resizable, or cannot support an append operation, this method should return false.

Specified by:
canAppendRow in interface TableDataProvider
Returns:
true if the data provider supports the append operation, or false if not.
Throws:
DataProviderException - Implementations may wish to surface internal exceptions (nested in DataProviderException). A DPE may also indicate that this RowKey does not represent a row provided by this TableDataProvider. Consult the documentation of the specific TableDataProvider implementation for details on what exceptions might be wrapped by a DPE.
See Also:
TableDataProvider.appendRow()

appendRow

public abstract RowKey appendRow()
                          throws DataProviderException

Appends a new row at the end of the list and returns the row key for the newly appended row.

NOTE: The method should only be called after testing the canAppendRow() method to see if this TableDataProvider supports the append operation.

Specified by:
appendRow in interface TableDataProvider
Returns:
The row key for the newly appended row
Throws:
DataProviderException - Implementations may wish to surface internal exceptions (nested in DataProviderException). Consult the documentation of the specific TableDataProvider implementation for details on what exceptions might be wrapped by a DPE.
See Also:
TableDataProvider.canAppendRow()

canRemoveRow

public abstract boolean canRemoveRow(RowKey row)
                              throws DataProviderException

This method is called to test if this TableDataProvider supports the removeRow operation. If rows can be removed from the table, this method should return true. If the data provider is does not support removing rows, this method should return false.

Specified by:
canRemoveRow in interface TableDataProvider
Parameters:
row - The desired row to remove
Returns:
true if the data provider supports removing rows, or false if not.
Throws:
DataProviderException - Implementations may wish to surface internal exceptions (nested in DataProviderException). A DPE may also indicate that this RowKey does not represent a row provided by this TableDataProvider. Consult the documentation of the specific TableDataProvider implementation for details on what exceptions might be wrapped by a DPE.
See Also:
TableDataProvider.removeRow(RowKey)

removeRow

public abstract void removeRow(RowKey row)
                        throws DataProviderException

Removes the specified row.

NOTE: The method should only be called after testing the canRemoveRow(RowKey) method to see if this TableDataProvider supports removing rows.

Specified by:
removeRow in interface TableDataProvider
Parameters:
row - The desired row key to remove
Throws:
DataProviderException - Implementations may wish to surface internal exceptions (nested in DataProviderException). A DPE may also indicate that this RowKey does not represent a row provided by this TableDataProvider. Consult the documentation of the specific TableDataProvider implementation for details on what exceptions might be wrapped by a DPE.
See Also:
TableDataProvider.canRemoveRow(RowKey)

getRowKeys

public RowKey[] getRowKeys(int count,
                           RowKey afterRow)
                    throws DataProviderException
Returns an array of RowKey objects representing the requested batch of RowKeys. If null is passed as the afterRow parameter, the returned batch of RowKeys will start with the first one.

Specified by:
getRowKeys in interface TableDataProvider
Parameters:
count - The desired count of RowKeys to fetch. If this number exceeds the total number of rows available, the return array will contain the available number, and no exception will be thrown. Consider this an optimistic request of the TableDataProvider.
afterRow - The RowKey that represents the last row before the set of desired RowKeys to be returned. Typically, this is the last RowKey from the previously fetched set of RowKeys. If null is passed, the returned set will begin with the first row.
Returns:
An array of RowKey objects representing the requested batch of rows.
Throws:
DataProviderException - Implementations may wish to surface internal exceptions (nested in DataProviderException) rather than simply returning null or an empty array. Consult the documentation of the specific TableDataProvider implementation for details on what exceptions might be wrapped by a DPE.

getRowKey

public RowKey getRowKey(java.lang.String rowId)
                 throws DataProviderException
Description copied from interface: TableDataProvider
Returns a RowKey for the specified rowId. This allows a RowKey to be stored off as a simple string, which can be resolved into an instance of a RowKey at a later date.

Specified by:
getRowKey in interface TableDataProvider
Parameters:
rowId - The cannoncial string ID of the desired RowKey
Returns:
A RowKey object representing the desired row, or null if the specified rowId does not correspond to a row in this TableDataProvider
Throws:
DataProviderException - Implementations may wish to surface internal exceptions (nested in DataProviderException) rather than simply returning null. Consult the documentation of the specific TableDataProvider implementation for details on what exceptions might be wrapped by a DPE.

isRowAvailable

public boolean isRowAvailable(RowKey row)
                       throws DataProviderException
Returns true if the specified RowKey represents data elements that are supported by this TableDataProvider; otherwise, return false

Specified by:
isRowAvailable in interface TableDataProvider
Parameters:
row - RowKey specifying row to be tested
Returns:
true if the row is available, false if not
Throws:
DataProviderException - Implementations may wish to surface internal exceptions (nested in DataProviderException) rather than simply returning false. Consult the documentation of the specific TableDataProvider implementation for details on what exceptions might be wrapped by a DPE.

getValue

public java.lang.Object getValue(java.lang.String fieldId,
                                 RowKey row)
                          throws DataProviderException
Throws:
DataProviderException
See Also:
getValue(FieldKey, RowKey)

setValue

public void setValue(java.lang.String fieldId,
                     RowKey row,
                     java.lang.Object value)
              throws DataProviderException
Throws:
DataProviderException
See Also:
setValue(FieldKey, RowKey, Object)

findFirst

public RowKey findFirst(java.lang.String fieldId,
                        java.lang.Object value)
                 throws DataProviderException
Throws:
DataProviderException
See Also:
findFirst(FieldKey, Object)

findFirst

public RowKey findFirst(java.lang.String[] fieldIds,
                        java.lang.Object[] values)
                 throws DataProviderException
Throws:
DataProviderException
See Also:
findFirst(FieldKey[], Object[])

findAll

public RowKey[] findAll(java.lang.String fieldId,
                        java.lang.Object value)
                 throws DataProviderException
Throws:
DataProviderException
See Also:
findAll(FieldKey, Object)

findAll

public RowKey[] findAll(java.lang.String[] fieldIds,
                        java.lang.Object[] values)
                 throws DataProviderException
Throws:
DataProviderException
See Also:
findAll(FieldKey[], Object[])

getAllRows

public RowKey[] getAllRows()
                    throws DataProviderException
Returns all the RowKeys, which may force the underlying dataprovider to go and perform an expensive operation to fetch them.

Returns:
RowKey[] All of the row keys in this TableDataProvider
Throws:
DataProviderException

findFirst

public RowKey findFirst(FieldKey fieldKey,
                        java.lang.Object value)
                 throws DataProviderException
Finds the first row with the specified value stored under the specified field key.

Parameters:
fieldKey - FieldKey
value - Object
Returns:
RowKey
Throws:
DataProviderException

findFirst

public RowKey findFirst(FieldKey[] fieldKeys,
                        java.lang.Object[] values)
                 throws DataProviderException
Finds the first row with the specified values stored under the specified field keys.

Parameters:
fieldKeys - FieldKey[]
values - Object[]
Returns:
RowKey
Throws:
DataProviderException

findAll

public RowKey[] findAll(FieldKey fieldKey,
                        java.lang.Object value)
                 throws DataProviderException
Finds all rows with the specified value stored under the specified field key.

Parameters:
fieldKey - FieldKey
value - Object
Returns:
RowKey[]
Throws:
DataProviderException

findAll

public RowKey[] findAll(FieldKey[] fieldKeys,
                        java.lang.Object[] values)
                 throws DataProviderException
Finds all rows with the specified values stored under the specified field keys.

Parameters:
fieldKeys - FieldKey[]
values - Object[]
Returns:
RowKey[]
Throws:
DataProviderException

getCursorIndex

protected int getCursorIndex()

setCursorIndex

protected boolean setCursorIndex(int index)

getCursorRow

public RowKey getCursorRow()
                    throws DataProviderException

Specified by:
getCursorRow in interface TableDataProvider
Returns:
the RowKey of the current cursor row position
Throws:
DataProviderException - Implementations may wish to surface internal exceptions (nested in DataProviderException). Consult the documentation of the specific TableDataProvider implementation for details on what exceptions might be wrapped by a DPE.

setCursorRow

public void setCursorRow(RowKey row)
                  throws TableCursorVetoException

Sets the cursor to the row represented by the passed RowKey.

Specified by:
setCursorRow in interface TableDataProvider
Parameters:
row - New RowKey to move the cursor to.
Throws:
TableCursorVetoException - if a TableCursorListener decides to veto the cursor navigation

cursorFirst

public boolean cursorFirst()
                    throws DataProviderException

Move the cursor to the first row in this TableDataProvider.

Specified by:
cursorFirst in interface TableDataProvider
Returns:
true if the cursor row was successfully changed; else false
Throws:
DataProviderException - Implementations may wish to surface internal exceptions (nested in DataProviderException) rather than simply returning false. Consult the documentation of the specific TableDataProvider implementation for details on what exceptions might be wrapped by a DPE.

cursorPrevious

public boolean cursorPrevious()
                       throws DataProviderException

Move the cursor to the row before the current cursor row, unless the cursor is currently at the first row.

Specified by:
cursorPrevious in interface TableDataProvider
Returns:
true if the cursor row was successfully changed; else false
Throws:
DataProviderException - Implementations may wish to surface internal exceptions (nested in DataProviderException) rather than simply returning false. Consult the documentation of the specific TableDataProvider implementation for details on what exceptions might be wrapped by a DPE.

cursorNext

public boolean cursorNext()
                   throws DataProviderException

Move the cursor to the row after the current cursor row, unless the cursor is currently at the last row TableDataProvider.

Specified by:
cursorNext in interface TableDataProvider
Returns:
true if the cursor row was successfully changed; else false
Throws:
DataProviderException - Implementations may wish to surface internal exceptions (nested in DataProviderException) rather than simply returning false. Consult the documentation of the specific TableDataProvider implementation for details on what exceptions might be wrapped by a DPE.

cursorLast

public boolean cursorLast()
                   throws DataProviderException

Move the cursor to the last row in this TableDataProvider.

Specified by:
cursorLast in interface TableDataProvider
Returns:
true if the cursor row was successfully changed; else false
Throws:
DataProviderException - Implementations may wish to surface internal exceptions (nested in DataProviderException) rather than simply returning false. Consult the documentation of the specific TableDataProvider implementation for details on what exceptions might be wrapped by a DPE.

getValue

public java.lang.Object getValue(FieldKey fieldKey)
                          throws DataProviderException

Returns value of the data element referenced by the specified FieldKey.

Specified by:
getValue in interface DataProvider
Specified by:
getValue in class AbstractDataProvider
Parameters:
fieldKey - FieldKey identifying the data element whose value is to be returned
Returns:
value of the data element referenced by the specified FieldKey
Throws:
DataProviderException - Implementations may wish to surface internal exceptions (nested in DataProviderException) rather than simply returning null. A DPE may also indicate that the passed fieldKey is not valid. Consult the documentation of the specific DataProvider implementation for details on what exceptions might be wrapped by a DPE.

setValue

public void setValue(FieldKey fieldKey,
                     java.lang.Object value)
              throws DataProviderException

Set the value of the data element represented by the specified FieldKey to the specified new value.

Specified by:
setValue in interface DataProvider
Specified by:
setValue in class AbstractDataProvider
Parameters:
fieldKey - FieldKey identifying the data element whose value is to be modified
value - New value for this data element
Throws:
DataProviderException - Implementations may wish to surface internal exceptions (nested in DataProviderException) rather than simply returning null. A DPE may also indicate that the passed fieldKey is not valid. Consult the documentation of the specific DataProvider implementation for details on what exceptions might be wrapped by a DPE.

addTableDataListener

public void addTableDataListener(TableDataListener l)

Register a new TableDataListener to this TableDataProvider instance.

Specified by:
addTableDataListener in interface TableDataProvider
Parameters:
l - New TableDataListener to register

removeTableDataListener

public void removeTableDataListener(TableDataListener l)

Deregister an existing TableDataListener from this TableDataProvider instance.

Specified by:
removeTableDataListener in interface TableDataProvider
Parameters:
l - Old TableDataListener to deregister

getTableDataListeners

public TableDataListener[] getTableDataListeners()

Specified by:
getTableDataListeners in interface TableDataProvider
Returns:
An array of the TableDataListeners currently registered on this TableDataProvider. If there are no registered listeners, a zero-length array is returned.

addTableCursorListener

public void addTableCursorListener(TableCursorListener listener)

Register a new TableCursorListener to this TableDataProvider instance.

Specified by:
addTableCursorListener in interface TableDataProvider
Parameters:
listener - New TableCursorListener to register

removeTableCursorListener

public void removeTableCursorListener(TableCursorListener listener)

Deregister an existing TableCursorListener from this TableDataProvider instance.

Specified by:
removeTableCursorListener in interface TableDataProvider
Parameters:
listener - Old TableCursorListener to deregister

getTableCursorListeners

public TableCursorListener[] getTableCursorListeners()

Specified by:
getTableCursorListeners in interface TableDataProvider
Returns:
An array of the TableCursorListeners currently registered on this TableDataProvider. If there are no registered listeners, a zero-length array is returned.

fireValueChanged

protected void fireValueChanged(FieldKey fieldKey,
                                RowKey row,
                                java.lang.Object oldValue,
                                java.lang.Object newValue)
Fires a valueChanged event to all registered TableDataListeners

Parameters:
row - The row of the value change
fieldKey - The FieldKey of the value change
oldValue - The old value (before the value change)
newValue - The new value (after the value change)

fireRowAdded

protected void fireRowAdded(RowKey newRow)
Fires a rowAdded event to all registered TableDataListeners

Parameters:
newRow - The newly added row

fireRowRemoved

protected void fireRowRemoved(RowKey oldRow)
Fires a rowRemoved event to all registered TableDataListeners

Parameters:
oldRow - The removed row

fireCursorChanging

protected void fireCursorChanging(RowKey oldRow,
                                  RowKey newRow)
                           throws TableCursorVetoException
Fires a cursorChanging event to all registered TableCursorListeners. If a TableCursorVetoException is thrown by any listeners, the cursor will not be changed.

Parameters:
oldRow - The old cursor row (before the cursor change)
newRow - The new cursor row (after the cursor change)
Throws:
TableCursorVetoException - This method may throw a TableCursorVetoException if one of registered listeners throws an exception. This will prevent the cursor move from occurring.

fireCursorChanged

protected void fireCursorChanged(RowKey oldRow,
                                 RowKey newRow)
Fires a cursorChanged event to all registered TableCursorListeners

Parameters:
oldRow - The old cursor row (before the cursor change)
newRow - The new cursor row (after the cursor change)