Oracle Fusion Middleware Java API Reference for Oracle ADF Model
11g Release 2 (11.1.2.0.0)

E17483-01

oracle.adf.model.adapter.bean.provider
Class BeanCollectionModel<E>

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

public abstract class BeanCollectionModel<E>
extends java.util.AbstractCollection<E>
implements PaginationCollectionModel<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
BeanCollectionModel()
           
 
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
 void clear()
           
 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 pageIndex)
          Return the page collection at pageIndex
 long getEstimatedRowCount()
          Return the total # of rows count for a query.
 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 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 setPageBlock(int pages)
           
 void setPageSize(int pageSize)
          Set page size
 void setRowCount(long rowCount)
          Set the total number row count for the collection
 int size()
           
 
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

BeanCollectionModel

public BeanCollectionModel()
Method Detail

refresh

public void refresh()
Refresh the colleciton


setPageBlock

public void setPageBlock(int pages)
Parameters:
pages - int pages per block

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>

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.

Specified by:
getEstimatedRowCount in interface PaginationCollectionModel<E>
Returns:
The method estimates long the number of rows in the collection.

addCollection

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

Specified by:
addCollection in interface PaginationCollectionModel<E>
Parameters:
data - Collection collection for page

getCollection

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

Specified by:
getCollection in interface PaginationCollectionModel<E>
Returns:
the paging collection Collection

getCollection

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

Specified by:
getCollection in interface PaginationCollectionModel<E>
Returns:
the paging collection at pageIndex

setPageSize

public void setPageSize(int pageSize)
Set page size

Specified by:
setPageSize in interface Pagination

setFetchSize

public void setFetchSize(int fetchSize)
Set fetch size

Specified by:
setFetchSize in interface Pagination

getFetchSize

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

Specified by:
getFetchSize in interface Pagination

setFetchStart

public void setFetchStart(int fetchStart)
Set fetch start

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

getFetchStart

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

Specified by:
getFetchStart in interface Pagination
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
Parameters:
rowCount -

getRowCount

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

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

firstPage

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

Specified by:
firstPage in interface Pagination

lastPage

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

Specified by:
lastPage in interface Pagination

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

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

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

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

Oracle Fusion Middleware Java API Reference for Oracle ADF Model
11g Release 2 (11.1.2.0.0)

E17483-01

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