com.sun.data.provider.impl
Class TableRowDataProvider

java.lang.Object
  extended bycom.sun.data.provider.impl.AbstractDataProvider
      extended bycom.sun.data.provider.impl.TableRowDataProvider
All Implemented Interfaces:
DataProvider, java.io.Serializable

public class TableRowDataProvider
extends AbstractDataProvider

The TableRowDataProvider class provides a single-row DataProvider view of a TableDataProvider. Set the 'tableDataProvider' and 'tableRow' properties to create a single-row view of the table.

Author:
Joe Nuxoll
See Also:
Serialized Form

Field Summary
 
Fields inherited from class com.sun.data.provider.impl.AbstractDataProvider
dpListeners, fieldKeys
 
Constructor Summary
TableRowDataProvider()
          Constructs a TableRowDataProvider with no tableDataProvider or tableRow setting.
TableRowDataProvider(TableDataProvider provider)
          Constructs a TableRowDataProvider with the specified tableDataProvider
TableRowDataProvider(TableDataProvider provider, RowKey tableRow)
          Constructs a TableRowDataProvider with the specified tableDataProvider and tableRow.
 
Method Summary
 FieldKey getFieldKey(java.lang.String fieldId)
          

Returns the FieldKey associated with the specified data element canonical id, if any; otherwise, return null.

 FieldKey[] getFieldKeys()
          
 TableDataProvider getTableDataProvider()
           
 RowKey getTableRow()
           
 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.

 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.

 void setTableDataProvider(TableDataProvider provider)
           
 void setTableRow(RowKey tableRow)
           
 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.

 
Methods inherited from class com.sun.data.provider.impl.AbstractDataProvider
addDataListener, addFieldKey, addFieldKeys, clearFieldKeys, fireProviderChanged, fireValueChanged, getDataListeners, getFakeData, getFakeData, 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
 

Constructor Detail

TableRowDataProvider

public TableRowDataProvider()
Constructs a TableRowDataProvider with no tableDataProvider or tableRow setting.


TableRowDataProvider

public TableRowDataProvider(TableDataProvider provider)
Constructs a TableRowDataProvider with the specified tableDataProvider

Parameters:
provider - TableDataProvider

TableRowDataProvider

public TableRowDataProvider(TableDataProvider provider,
                            RowKey tableRow)
Constructs a TableRowDataProvider with the specified tableDataProvider and tableRow.

Parameters:
provider - TableDataProvider
tableRow - RowKey
Method Detail

setTableDataProvider

public void setTableDataProvider(TableDataProvider provider)
Parameters:
provider - TableDataProvider

getTableDataProvider

public TableDataProvider getTableDataProvider()
Returns:
TableDataProvider

setTableRow

public void setTableRow(RowKey tableRow)
Parameters:
tableRow - int

getTableRow

public RowKey getTableRow()
Returns:
RowKey

getFieldKeys

public FieldKey[] getFieldKeys()
                        throws DataProviderException
Description copied from class: AbstractDataProvider

Specified by:
getFieldKeys in interface DataProvider
Overrides:
getFieldKeys in class AbstractDataProvider
Returns:
FieldKey[]
Throws:
DataProviderException

getFieldKey

public FieldKey getFieldKey(java.lang.String fieldId)
                     throws DataProviderException
Description copied from class: AbstractDataProvider

Returns the FieldKey associated with the specified data element canonical id, if any; otherwise, return null.

Specified by:
getFieldKey in interface DataProvider
Overrides:
getFieldKey in class AbstractDataProvider
Parameters:
fieldId - String
Returns:
FieldKey
Throws:
DataProviderException

getType

public java.lang.Class getType(FieldKey fieldKey)
                        throws DataProviderException
Description copied from class: AbstractDataProvider

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
Returns:
Class
Throws:
DataProviderException

isReadOnly

public boolean isReadOnly(FieldKey fieldKey)
                   throws DataProviderException
Description copied from class: AbstractDataProvider

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
Returns:
boolean
Throws:
DataProviderException

getValue

public java.lang.Object getValue(FieldKey fieldKey)
                          throws DataProviderException
Description copied from class: AbstractDataProvider

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
Returns:
Object
Throws:
DataProviderException

setValue

public void setValue(FieldKey fieldKey,
                     java.lang.Object value)
              throws DataProviderException
Description copied from class: AbstractDataProvider

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
value - Object
Throws:
DataProviderException