net.smartlab.web
Class BusinessObjectFactory.Paginator

java.lang.Object
  extended by net.smartlab.web.page.Paginator
      extended by net.smartlab.web.BusinessObjectFactory.Paginator
All Implemented Interfaces:
java.lang.Iterable, java.util.Collection, java.util.Iterator
Enclosing class:
BusinessObjectFactory

public class BusinessObjectFactory.Paginator
extends Paginator
implements java.util.Collection

TODO documentation


Field Summary
 
Fields inherited from class net.smartlab.web.page.Paginator
array, UNDEFINED_PAGE, UNLIMITED_ITEMS, UNLIMITED_PAGES
 
Constructor Summary
BusinessObjectFactory.Paginator(org.hibernate.Criteria criteria)
          Constructs an instance on an Hibernate criteria with an unlimited number of items per page and an unlimited number of pages displayed.
BusinessObjectFactory.Paginator(org.hibernate.Criteria criteria, int size, int pages)
          Constructs an instance on an Hibernate criteria with the specified number of elements per page and the specified number of pages displayed.
BusinessObjectFactory.Paginator(Query query)
          Constructs an instance on an Hibernate query with an unlimited number of items per page and an unlimited number of pages displayed.
BusinessObjectFactory.Paginator(Query query, int size, int pages)
          Constructs an instance on an Hibernate query with the specified number of elements per page and the specified number of pages displayed.
 
Method Summary
 boolean add(java.lang.Object obj)
           
 boolean addAll(java.util.Collection collection)
           
 void clear()
           
 boolean contains(java.lang.Object item)
           
 boolean containsAll(java.util.Collection item)
           
 boolean isEmpty()
           
 java.util.Iterator iterator()
           
 boolean remove(java.lang.Object obj)
           
 boolean removeAll(java.util.Collection collection)
           
 boolean retainAll(java.util.Collection collection)
           
protected  void setArray()
          TODO documentation
 void setPage(int page)
          TODO documentation
 void setSize(int size)
          TODO documentation
 int size()
           
 java.lang.Object[] toArray()
           
 java.lang.Object[] toArray(java.lang.Object[] array)
           
 
Methods inherited from class net.smartlab.web.page.Paginator
getCount, getNext, getPage, getPageCount, getPages, getPageSize, getPrev, getStart, getStop, hasNext, next, remove, reset, setCount, setPages, setPageSize
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface java.util.Collection
equals, hashCode
 

Constructor Detail

BusinessObjectFactory.Paginator

public BusinessObjectFactory.Paginator(org.hibernate.Criteria criteria)
                                throws org.hibernate.HibernateException
Constructs an instance on an Hibernate criteria with an unlimited number of items per page and an unlimited number of pages displayed.

Parameters:
criteria - the Hibernate criteria whose results must be paginated.
Throws:
org.hibernate.HibernateException - if something wrong occurs accessing the database.

BusinessObjectFactory.Paginator

public BusinessObjectFactory.Paginator(org.hibernate.Criteria criteria,
                                       int size,
                                       int pages)
                                throws org.hibernate.HibernateException
Constructs an instance on an Hibernate criteria with the specified number of elements per page and the specified number of pages displayed.

Parameters:
criteria - the Hibernate criteria whose results must be paginated.
size - the number of elements per page.
pages - the number of pages to be displayed for quick navigation.
Throws:
org.hibernate.HibernateException - if something wrong occurs accessing the database.

BusinessObjectFactory.Paginator

public BusinessObjectFactory.Paginator(Query query)
                                throws DAOException,
                                       org.hibernate.HibernateException
Constructs an instance on an Hibernate query with an unlimited number of items per page and an unlimited number of pages displayed.

Parameters:
query - the Hibernate query whose results must be paginated.
Throws:
DAOException - if something wrong occurs accessing the underling data layer.
org.hibernate.HibernateException - if something wrong occurs accessing the database.

BusinessObjectFactory.Paginator

public BusinessObjectFactory.Paginator(Query query,
                                       int size,
                                       int pages)
                                throws DAOException,
                                       org.hibernate.HibernateException
Constructs an instance on an Hibernate query with the specified number of elements per page and the specified number of pages displayed. FIXME the computation of rowCount is still slow on long lists.

Parameters:
query - the Hibernate query whose results must be paginated.
size - the number of elements per page.
pages - the number of pages to be displayed for quick navigation.
Throws:
DAOException - if something wrong occurs accessing the underling data layer.
org.hibernate.HibernateException - if something wrong occurs accessing the database.
Method Detail

setPage

public void setPage(int page)
Description copied from class: Paginator
TODO documentation

Overrides:
setPage in class Paginator
See Also:
Paginator.setPage(int)

setSize

public void setSize(int size)
TODO documentation

Parameters:
size -

setArray

protected void setArray()
Description copied from class: Paginator
TODO documentation

Specified by:
setArray in class Paginator
See Also:
Paginator.setArray()

add

public boolean add(java.lang.Object obj)
Specified by:
add in interface java.util.Collection
See Also:
Collection.add(java.lang.Object)

addAll

public boolean addAll(java.util.Collection collection)
Specified by:
addAll in interface java.util.Collection
See Also:
Collection.addAll(java.util.Collection)

clear

public void clear()
Specified by:
clear in interface java.util.Collection
See Also:
Collection.clear()

contains

public boolean contains(java.lang.Object item)
Specified by:
contains in interface java.util.Collection
See Also:
Collection.contains(java.lang.Object)

containsAll

public boolean containsAll(java.util.Collection item)
Specified by:
containsAll in interface java.util.Collection
See Also:
Collection.containsAll(java.util.Collection)

isEmpty

public boolean isEmpty()
Specified by:
isEmpty in interface java.util.Collection
See Also:
Collection.isEmpty()

iterator

public java.util.Iterator iterator()
Specified by:
iterator in interface java.lang.Iterable
Specified by:
iterator in interface java.util.Collection
See Also:
Collection.iterator()

remove

public boolean remove(java.lang.Object obj)
Specified by:
remove in interface java.util.Collection
See Also:
Collection.remove(java.lang.Object)

removeAll

public boolean removeAll(java.util.Collection collection)
Specified by:
removeAll in interface java.util.Collection
See Also:
Collection.removeAll(java.util.Collection)

retainAll

public boolean retainAll(java.util.Collection collection)
Specified by:
retainAll in interface java.util.Collection
See Also:
Collection.retainAll(java.util.Collection)

size

public int size()
Specified by:
size in interface java.util.Collection
See Also:
Collection.size()

toArray

public java.lang.Object[] toArray()
Specified by:
toArray in interface java.util.Collection
See Also:
Collection.toArray()

toArray

public java.lang.Object[] toArray(java.lang.Object[] array)
Specified by:
toArray in interface java.util.Collection
See Also:
Collection.toArray(java.lang.Object[])


Copyright © 2004-2009 The SmartWeb Team. All Rights Reserved.