com.inmethod.grid
Class DataProviderAdapter<T>
java.lang.Object
com.inmethod.grid.DataProviderAdapter<T>
- Type Parameters:
T - row/item model object type
- All Implemented Interfaces:
- IDataSource<T>, Serializable, IClusterable, IDetachable
- Direct Known Subclasses:
- AppendableDataProviderAdapter
public class DataProviderAdapter<T>
- extends Object
- implements IDataSource<T>
Adapter that allows using a wicket extension IDataProvider in an AbstractGrid.
The adapter also supports sortable data providers.
- Author:
- Matej Knopp
- See Also:
- Serialized Form
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DataProviderAdapter
public DataProviderAdapter(IDataProvider<T> dataProvider)
- Creates a new
DataProviderAdapter instance.
- Parameters:
dataProvider - IDataProvider instance
detach
public void detach()
-
- Specified by:
detach in interface IDetachable
model
public IModel<T> model(T object)
- Allows wrapping the object in a model which will be set as model of the appropriate row. In
most cases the model should be detachable.
- Specified by:
model in interface IDataSource<T>
- Returns:
- model that can be used to access the object
query
public void query(IDataSource.IQuery query,
IDataSource.IQueryResult<T> result)
- Implementation of this method should load subset of the data specified by
query.getFrom() and query.getCount(). Also if the total item count
can be determined, it should be passed to result.
- Specified by:
query in interface IDataSource<T>
- Parameters:
query - Specified the amount and position of items to be queriedresult - Allows to set the total item count and result items
Copyright © 2007-2012 inMethod s.r.o.. All Rights Reserved.