| java.lang.Object com.sun.data.provider.impl.AbstractDataProvider com.sun.data.provider.impl.AbstractTableDataProvider com.sun.data.provider.impl.ListDataProvider
ListDataProvider | public class ListDataProvider extends AbstractTableDataProvider (Code) | | This
com.sun.data.provider.TableDataProvider implementation
wraps the contents of a
List . This DataProvider ignores FieldKeys
entirely, and maintains a single list of objects.
NOTE about Serializable: By default, this class uses an
ArrayList as its internal data storage, which is a Serializable implementation of
List . The internal storage can be swapped out using the
setList(List) method. For this class to remain Serializable,
the contained List must be a Serializable implementation. Also, and more
importantly, the contents of the storage List must be Serializable as well
for this class to successfully be serialized.
author: Joe Nuxoll |
Constructor Summary | |
public | ListDataProvider() | public | ListDataProvider(List list) Constructs a new ListDataProvider using the specified List as internal
storage.
NOTE about Serializable: By default, this class uses an
ArrayList as its internal data storage, which is a Serializable
implementation of
List . |
ListDataProvider | public ListDataProvider()(Code) | | Constructs a new ListDataProvider using the default internal storage
|
ListDataProvider | public ListDataProvider(List list)(Code) | | Constructs a new ListDataProvider using the specified List as internal
storage.
NOTE about Serializable: By default, this class uses an
ArrayList as its internal data storage, which is a Serializable
implementation of
List . The internal storage can be swapped out
using the setList(List) method. For this class to remain
Serializable, the contained List must be a Serializable implementation.
Also, and more importantly, the contents of the storage List must be
Serializable as well for this class to successfully be serialized.
Parameters: list - List to use for internal storage |
canAppendRow | public boolean canAppendRow() throws DataProviderException(Code) | | NOTE: This implementation always returns false from this
method. To resize the data provider, access the List directly.
|
canInsertRow | public boolean canInsertRow(RowKey beforeRow) throws DataProviderException(Code) | | NOTE: This implementation always returns false from this
method. To resize the data provider, access the List directly.
|
getList | public List getList()(Code) | | List used for internal storage |
isReadOnly | public boolean isReadOnly(FieldKey fieldKey) throws DataProviderException(Code) | | NOTE: FieldKey is ignored in this class.
NOTE: This method always returns false, as the storage List can be edited
at any row.
|
setList | public void setList(List list)(Code) | | Sets the List to use for internal storage.
NOTE about Serializable: By default, this class uses an
ArrayList as its internal data storage, which is a Serializable
implementation of
List . The internal storage can be swapped out
using the setList(List) method. For this class to remain
Serializable, the contained List must be a Serializable implementation.
Also, and more importantly, the contents of the storage List must be
Serializable as well for this class to successfully be serialized.
Parameters: list - List to use for internal storage |
Methods inherited from com.sun.data.provider.impl.AbstractTableDataProvider | public void addTableCursorListener(TableCursorListener listener)(Code)(Java Doc) public void addTableDataListener(TableDataListener l)(Code)(Java Doc) abstract public RowKey appendRow() throws DataProviderException(Code)(Java Doc) abstract public boolean canAppendRow() throws DataProviderException(Code)(Java Doc) abstract public boolean canInsertRow(RowKey beforeRow) throws DataProviderException(Code)(Java Doc) abstract public boolean canRemoveRow(RowKey row) throws DataProviderException(Code)(Java Doc) public boolean cursorFirst() throws DataProviderException(Code)(Java Doc) public boolean cursorLast() throws DataProviderException(Code)(Java Doc) public boolean cursorNext() throws DataProviderException(Code)(Java Doc) public boolean cursorPrevious() throws DataProviderException(Code)(Java Doc) public RowKey[] findAll(String fieldId, Object value) throws DataProviderException(Code)(Java Doc) public RowKey[] findAll(String[] fieldIds, Object[] values) throws DataProviderException(Code)(Java Doc) public RowKey[] findAll(FieldKey fieldKey, Object value) throws DataProviderException(Code)(Java Doc) public RowKey[] findAll(FieldKey[] fieldKeys, Object[] values) throws DataProviderException(Code)(Java Doc) public RowKey findFirst(String fieldId, Object value) throws DataProviderException(Code)(Java Doc) public RowKey findFirst(String[] fieldIds, Object[] values) throws DataProviderException(Code)(Java Doc) public RowKey findFirst(FieldKey fieldKey, Object value) throws DataProviderException(Code)(Java Doc) public RowKey findFirst(FieldKey[] fieldKeys, Object[] values) throws DataProviderException(Code)(Java Doc) protected void fireCursorChanged(RowKey oldRow, RowKey newRow)(Code)(Java Doc) protected void fireCursorChanging(RowKey oldRow, RowKey newRow) throws TableCursorVetoException(Code)(Java Doc) protected void fireRowAdded(RowKey newRow)(Code)(Java Doc) protected void fireRowRemoved(RowKey oldRow)(Code)(Java Doc) protected void fireValueChanged(FieldKey fieldKey, RowKey row, Object oldValue, Object newValue)(Code)(Java Doc) public RowKey[] getAllRows() throws DataProviderException(Code)(Java Doc) protected int getCursorIndex()(Code)(Java Doc) public RowKey getCursorRow() throws DataProviderException(Code)(Java Doc) abstract public int getRowCount() throws DataProviderException(Code)(Java Doc) public RowKey getRowKey(String rowId) throws DataProviderException(Code)(Java Doc) public RowKey[] getRowKeys(int count, RowKey afterRow) throws DataProviderException(Code)(Java Doc) public TableCursorListener[] getTableCursorListeners()(Code)(Java Doc) public TableDataListener[] getTableDataListeners()(Code)(Java Doc) abstract public Class getType(FieldKey fieldKey) throws DataProviderException(Code)(Java Doc) abstract public Object getValue(FieldKey fieldKey, RowKey row) throws DataProviderException(Code)(Java Doc) public Object getValue(String fieldId, RowKey row) throws DataProviderException(Code)(Java Doc) public Object getValue(FieldKey fieldKey) throws DataProviderException(Code)(Java Doc) abstract public RowKey insertRow(RowKey beforeRow) throws DataProviderException(Code)(Java Doc) abstract public boolean isReadOnly(FieldKey fieldKey) throws DataProviderException(Code)(Java Doc) public boolean isRowAvailable(RowKey row) throws DataProviderException(Code)(Java Doc) abstract public void removeRow(RowKey row) throws DataProviderException(Code)(Java Doc) public void removeTableCursorListener(TableCursorListener listener)(Code)(Java Doc) public void removeTableDataListener(TableDataListener l)(Code)(Java Doc) protected boolean setCursorIndex(int index)(Code)(Java Doc) public void setCursorRow(RowKey row) throws TableCursorVetoException(Code)(Java Doc) abstract public void setValue(FieldKey fieldKey, RowKey row, Object value) throws DataProviderException(Code)(Java Doc) public void setValue(String fieldId, RowKey row, Object value) throws DataProviderException(Code)(Java Doc) public void setValue(FieldKey fieldKey, Object value) throws DataProviderException(Code)(Java Doc)
|
|
|