Oracle Fusion Middleware Java API Reference for Oracle ADF Model
11g Release 1 (11.1.1.7.0)

E10653-08

oracle.adf.model.adapter.bean.pagination
Class PaginationCollectionModel<E>

java.lang.Object
  extended by java.util.AbstractCollection<E>
      extended by oracle.adf.model.adapter.bean.pagination.PaginationCollectionModel<E>
All Implemented Interfaces:
java.lang.Iterable<E>, java.util.Collection<E>, Pagination<E>
Direct Known Subclasses:
BeanDataCollection

public abstract class PaginationCollectionModel<E>
extends java.util.AbstractCollection<E>
implements Pagination<E>

Since:
11.1.2

Field Summary
protected  oracle.adf.share.logging.ADFLogger _logger
          Logger
static int DEFAULT_FETCH_SIZE
          Default fetch size
 
Constructor Summary
PaginationCollectionModel()
           
 
Method Summary
 boolean add(E e)
           
 void add(int index, E e)
           
 boolean addAll(java.util.Collection<? extends E> c)
           
 void addCollection(java.util.Collection<E> data)
          Add data to managed collection
 boolean canHandle()
           
 void clear()
           
protected  void clearAll()
          Clear data buffer and cache page
 void firstPage()
          Action method bound to the "|< First" link.
 java.util.Collection<E> getCollection()
          Returns a list of object that fit the given paging range.
 java.util.Collection<E> getCollection(int start)
          Return the page collection at startIndex
 java.lang.Object getDataProvider()
          Returns the data object for this collection represents.
 long getEstimatedRowCount()
          Return the total # of rows count for a query.
 int getFetchedRowCount()
           
 int getFetchSize()
          Return the fetch size per page
 int getFetchStart()
          Return fetch start
 int getPageCount()
           
 int getPageIndex()
           
 long getRowCount()
          Return the total rows count
 boolean hasNextPage()
          Method queried by the "Next" link to determine its enabled state.
 boolean hasPreviousPage()
          Method queried by the "Previous" link to determine its enabled state.
 java.util.Iterator<E> iterator()
          Return an iterator of this collection
 void lastPage()
          Action method bound to the "Last >|" link.
 void nextPage()
          Action method bound to the "Next >" link.
 void notifyRefresh()
           
 void previousPage()
          Action method bound to the "< Previous" link.
 void refresh()
          Refresh the colleciton
 java.lang.Object remove(int index)
           
 boolean remove(java.lang.Object o)
           
 void setFetchSize(int fetchSize)
          Set fetch size
 void setFetchStart(int fetchStart)
          Set fetch start
 void setPageSize(int pageSize)
          Set page size
 void setRowCount(long rowCount)
          Set the total number row count for the collection
 int size()
           
 boolean supportsDefaultPaging()
           
 boolean supportsRangePaging()
           
 
Methods inherited from class java.util.AbstractCollection
contains, containsAll, isEmpty, removeAll, retainAll, toArray, toArray, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.util.Collection
equals, hashCode
 

Field Detail

_logger

protected oracle.adf.share.logging.ADFLogger _logger
Logger


DEFAULT_FETCH_SIZE

public static final int DEFAULT_FETCH_SIZE
Default fetch size

See Also:
Constant Field Values
Constructor Detail

PaginationCollectionModel

public PaginationCollectionModel()
Method Detail

refresh

public void refresh()
Refresh the colleciton


notifyRefresh

public void notifyRefresh()

canHandle

public boolean canHandle()

supportsRangePaging

public boolean supportsRangePaging()

supportsDefaultPaging

public boolean supportsDefaultPaging()

addAll

public boolean addAll(java.util.Collection<? extends E> c)
Specified by:
addAll in interface java.util.Collection<E>
Overrides:
addAll in class java.util.AbstractCollection<E>

add

public boolean add(E e)
Specified by:
add in interface java.util.Collection<E>
Overrides:
add in class java.util.AbstractCollection<E>

add

public void add(int index,
                E e)

remove

public boolean remove(java.lang.Object o)
Specified by:
remove in interface java.util.Collection<E>
Overrides:
remove in class java.util.AbstractCollection<E>

remove

public java.lang.Object remove(int index)

size

public int size()
Specified by:
size in interface java.util.Collection<E>
Specified by:
size in class java.util.AbstractCollection<E>

clear

public void clear()
Specified by:
clear in interface java.util.Collection<E>
Overrides:
clear in class java.util.AbstractCollection<E>

clearAll

protected void clearAll()
Clear data buffer and cache page


iterator

public java.util.Iterator<E> iterator()
Return an iterator of this collection

Specified by:
iterator in interface java.lang.Iterable<E>
Specified by:
iterator in interface java.util.Collection<E>
Specified by:
iterator in class java.util.AbstractCollection<E>

getEstimatedRowCount

public long getEstimatedRowCount()
Return the total # of rows count for a query.


addCollection

public void addCollection(java.util.Collection<E> data)
Add data to managed collection


getCollection

public java.util.Collection<E> getCollection()
Returns a list of object that fit the given paging range.


getCollection

public java.util.Collection<E> getCollection(int start)
Return the page collection at startIndex


getDataProvider

public java.lang.Object getDataProvider()
Returns the data object for this collection represents.


setPageSize

public void setPageSize(int pageSize)
Set page size

Specified by:
setPageSize in interface Pagination<E>

setFetchSize

public void setFetchSize(int fetchSize)
Set fetch size

Specified by:
setFetchSize in interface Pagination<E>

getFetchSize

public int getFetchSize()
Description copied from interface: Pagination
Return the fetch size per page

Specified by:
getFetchSize in interface Pagination<E>

setFetchStart

public void setFetchStart(int fetchStart)
Set fetch start

Specified by:
setFetchStart in interface Pagination<E>
Parameters:
fetchStart - int rangeStart.

getFetchStart

public int getFetchStart()
Description copied from interface: Pagination
Return fetch start

Specified by:
getFetchStart in interface Pagination<E>
Returns:
fetch start position

getPageIndex

public int getPageIndex()
Returns:
current page index

getPageCount

public int getPageCount()
Returns:
the number of pages in the collection

setRowCount

public void setRowCount(long rowCount)
Set the total number row count for the collection

Specified by:
setRowCount in interface Pagination<E>
Parameters:
rowCount -

getRowCount

public long getRowCount()
Description copied from interface: Pagination
Return the total rows count

Specified by:
getRowCount in interface Pagination<E>
Returns:
The total numer of row count

getFetchedRowCount

public int getFetchedRowCount()

firstPage

public void firstPage()
Action method bound to the "|< First" link. The _fromRange row

Specified by:
firstPage in interface Pagination<E>

lastPage

public void lastPage()
Action method bound to the "Last >|" link. Increment to the row.

Specified by:
lastPage in interface Pagination<E>

nextPage

public void nextPage()
Action method bound to the "Next >" link. Increment the row cursor by the increment size.

Specified by:
nextPage in interface Pagination<E>

previousPage

public void previousPage()
Action method bound to the "< Previous" link. Decrements the row cursor by the increment size.

Specified by:
previousPage in interface Pagination<E>

hasNextPage

public boolean hasNextPage()
Method queried by the "Next" link to determine its enabled state. Returns true if another _page exists.

Specified by:
hasNextPage in interface Pagination<E>

hasPreviousPage

public boolean hasPreviousPage()
Method queried by the "Previous" link to determine its enabled state. Returns true if a previous _page exists.

Specified by:
hasPreviousPage in interface Pagination<E>

Oracle Fusion Middleware Java API Reference for Oracle ADF Model
11g Release 1 (11.1.1.7.0)

E10653-08

Copyright © 1997, 2013, Oracle. All rights reserved.