Class DataProviderAdapter<T,​S>

    • Method Detail

      • 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 queried
        result - Allows to set the total item count and result items