org.shept.persistence.provider
Class AbstractScrollingListProvider

java.lang.Object
  extended by org.shept.persistence.provider.AbstractScrollingListProvider
All Implemented Interfaces:
ScrollingListProvider
Direct Known Subclasses:
AbstractHibernateListProvider

public abstract class AbstractScrollingListProvider
extends Object
implements ScrollingListProvider

Version:
$$Id: AbstractScrollingListProvider.java 34 2010-08-20 16:46:49Z aha $$
Author:
Andi

Field Summary
protected  org.springframework.dao.support.DaoSupport dao
           
protected  boolean eol
           
protected  FilterDefinition filterDefinition
           
protected  int loaded
           
protected  int loadSize
           
protected  org.apache.commons.logging.Log logger
          Logger that is available to subclasses
protected  org.springframework.beans.support.SortDefinition sortDefinition
           
 
Constructor Summary
AbstractScrollingListProvider()
           
 
Method Summary
 org.springframework.dao.support.DaoSupport getDao()
           
 FilterDefinition getFilterDefinition()
           
 int getLoadSize()
           
 org.springframework.beans.support.SortDefinition getSortDefinition()
           
protected  void incrementLoadSizeAfterFetch(int numberOfRows)
           
 boolean isEol()
           
abstract  List<?> loadListFirst()
          Read the first chunk of elements from the underlying datasource.
abstract  List<?> loadListNext()
          Read a subsequent portion of elements from the underlying datasource
 void setDao(org.springframework.dao.support.DaoSupport dao)
          Set the data access object which depends on the persistence layer in use
 void setFilterDefinition(FilterDefinition filterProvider)
           
 void setLoadSize(int loadSize)
          set the load size which will be used for paging
 void setSortDefinition(org.springframework.beans.support.SortDefinition sortDefinition)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

logger

protected final org.apache.commons.logging.Log logger
Logger that is available to subclasses


loadSize

protected int loadSize

loaded

protected int loaded

eol

protected boolean eol

filterDefinition

protected FilterDefinition filterDefinition

sortDefinition

protected org.springframework.beans.support.SortDefinition sortDefinition

dao

protected org.springframework.dao.support.DaoSupport dao
Constructor Detail

AbstractScrollingListProvider

public AbstractScrollingListProvider()
Method Detail

getDao

public org.springframework.dao.support.DaoSupport getDao()
Specified by:
getDao in interface ScrollingListProvider
Returns:
the data access object which depends on the persistence layer in use

setDao

public void setDao(org.springframework.dao.support.DaoSupport dao)
Description copied from interface: ScrollingListProvider
Set the data access object which depends on the persistence layer in use

Specified by:
setDao in interface ScrollingListProvider
Parameters:
dao - the dao to set

getLoadSize

public int getLoadSize()
Specified by:
getLoadSize in interface ScrollingListProvider
Returns:
Number of records to read from the database initially and subsequently (if paging is supported)

isEol

public boolean isEol()
Specified by:
isEol in interface ScrollingListProvider
Returns:
true if end-of-lines is reached (no further results available)

loadListFirst

public abstract List<?> loadListFirst()
Description copied from interface: ScrollingListProvider
Read the first chunk of elements from the underlying datasource.

Specified by:
loadListFirst in interface ScrollingListProvider
Returns:
the resulting list of elements

loadListNext

public abstract List<?> loadListNext()
Description copied from interface: ScrollingListProvider
Read a subsequent portion of elements from the underlying datasource

Specified by:
loadListNext in interface ScrollingListProvider
Returns:
the resulting list of elements

setLoadSize

public void setLoadSize(int loadSize)
Description copied from interface: ScrollingListProvider
set the load size which will be used for paging

Specified by:
setLoadSize in interface ScrollingListProvider

getFilterDefinition

public FilterDefinition getFilterDefinition()
Specified by:
getFilterDefinition in interface ScrollingListProvider
Returns:
the filterProvider

setFilterDefinition

public void setFilterDefinition(FilterDefinition filterProvider)
Specified by:
setFilterDefinition in interface ScrollingListProvider
Parameters:
filterProvider - the filterProvider to set

getSortDefinition

public org.springframework.beans.support.SortDefinition getSortDefinition()
Specified by:
getSortDefinition in interface ScrollingListProvider
Returns:
the sortDefinition

setSortDefinition

public void setSortDefinition(org.springframework.beans.support.SortDefinition sortDefinition)
Specified by:
setSortDefinition in interface ScrollingListProvider
Parameters:
sortDefinition - the sortDefinition to set

incrementLoadSizeAfterFetch

protected void incrementLoadSizeAfterFetch(int numberOfRows)
Parameters:
-


Copyright © 2011. All Rights Reserved.