Class AbstractListAccess<E>

java.lang.Object
org.exoplatform.forum.common.utils.AbstractListAccess<E>
All Implemented Interfaces:
org.exoplatform.commons.utils.ListAccess<E>
Direct Known Subclasses:
UserListAccess

public abstract class AbstractListAccess<E> extends Object implements org.exoplatform.commons.utils.ListAccess<E>
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected int
     
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    int
    Get the currentPage of page list access
    int
    Get fromIndex of page
    int
    Get current offset
    int
    getOffset(int page)
    Get the offset by page
    int
    Get the page size of page list access
    int
    Get toIndex of page
    int
    Get total page of page list access
    void
    initialize(int pageSize, int pageSelect)
    Initialize page list access
    abstract E[]
    load(int pageSelect)
     
    void
    reCalculate(int offset, int limit)
    Re-calculate the value of currentPage
    void
    setCurrentPage(int page)
    Set the currentPage of page list access
    void
    setPageSize(int pageSize)
    Set the page size of page list access

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface org.exoplatform.commons.utils.ListAccess

    getSize, load
  • Field Details

    • size

      protected int size
  • Constructor Details

    • AbstractListAccess

      public AbstractListAccess()
  • Method Details

    • load

      public abstract E[] load(int pageSelect) throws Exception, IllegalArgumentException
      Throws:
      Exception
      IllegalArgumentException
    • reCalculate

      public void reCalculate(int offset, int limit)
      Re-calculate the value of currentPage
      Parameters:
      offset -
      limit -
    • initialize

      public void initialize(int pageSize, int pageSelect) throws Exception
      Initialize page list access
      Parameters:
      pageSize -
      pageSelect -
      Throws:
      Exception
    • getTotalPages

      public int getTotalPages() throws Exception
      Get total page of page list access
      Returns:
      Throws:
      Exception
    • getPageSize

      public int getPageSize()
      Get the page size of page list access
      Returns:
    • setPageSize

      public void setPageSize(int pageSize)
      Set the page size of page list access
      Parameters:
      pageSize -
    • getCurrentPage

      public int getCurrentPage()
      Get the currentPage of page list access
      Returns:
    • setCurrentPage

      public void setCurrentPage(int page)
      Set the currentPage of page list access
      Parameters:
      page -
    • getOffset

      public int getOffset(int page)
      Get the offset by page
      Parameters:
      page -
      Returns:
    • getOffset

      public int getOffset()
      Get current offset
      Returns:
    • getFrom

      public int getFrom()
      Get fromIndex of page
      Returns:
    • getTo

      public int getTo()
      Get toIndex of page
      Returns: