br.com.arsmachina.tapestrycrud.grid
Class PagedSearchGridDataSource<T>

java.lang.Object
  extended by br.com.arsmachina.tapestrycrud.grid.PagedSearchGridDataSource<T>
Type Parameters:
T - the type of the elements returned.
All Implemented Interfaces:
GridDataSource
Direct Known Subclasses:
ControllerGridDataSource

public class PagedSearchGridDataSource<T>
extends Object
implements GridDataSource

GridDataSource implementation using a Controller instance, specifically its ReadableController.findAll(int, int, SortCriterion[]) method.

Author:
Thiago H. de Paula Figueiredo

Constructor Summary
PagedSearchGridDataSource(Class<T> clasz, PagedSearch<T> pagedSearch)
          Single construtctor of this class.
 
Method Summary
 int getAvailableRows()
           
 Class getRowType()
           
 Object getRowValue(int index)
           
 void prepare(int firstIndex, int endIndex, List<SortConstraint> sortConstraints)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PagedSearchGridDataSource

public PagedSearchGridDataSource(Class<T> clasz,
                                 PagedSearch<T> pagedSearch)
Single construtctor of this class.

Parameters:
clasz - the type of the returned objects. It cannot be null.
pagedSearch - a Controller. It cannot be null.
Method Detail

getAvailableRows

public int getAvailableRows()
Specified by:
getAvailableRows in interface GridDataSource

getRowType

public Class getRowType()
Specified by:
getRowType in interface GridDataSource

getRowValue

public Object getRowValue(int index)
Specified by:
getRowValue in interface GridDataSource

prepare

public void prepare(int firstIndex,
                    int endIndex,
                    List<SortConstraint> sortConstraints)
Specified by:
prepare in interface GridDataSource


Copyright © 2008-2009 Thiago H. de Paula Figueiredo. All Rights Reserved.