Oracle Fusion Middleware Java API Reference for Oracle ADF Mobile Client
11g Release 1 (11.1.1)

E17503-02

oracle.adfnmc.bindings.dbf
Interface ICollectionModel

All Known Implementing Classes:
RangeBindingImpl

public interface ICollectionModel

Exposes methods to access elements in an underlying model bound collection using an EL variable as an alias for the element. The index for the current element in the underlying model bound collection can be set directly, as well as an index that can be used to reference elements other than that which is considered 'current' by the underlying model (the evaluation index). Manipulating the latter index provides a way to evaluate different elements in the collection through a single EL expression without changing the state of the model.

The evaluation index should only differ from the underlying model current index for the duration of a call, this is why the methods that modify the evaluation index include a listener parameter. Callers should pass a listener that will perform whatever actions they need to that depend upon evaluating the EL expression at a position different than the underlying model current index. All other evaluations of the EL variable outside of the context of these calls should return the element that corresponds underlying model current index.

With the exception of setModelIndex, calls to the methods in this interface should leave the underlying model current index unmodified.


Method Summary
 void addCollectionModelListener(ICollectionModelListener listener)
           
 ControlBinding getBinding()
           
 int getCurrentModelIndex()
          Get the current underlying model index.
 int getElementCount()
          Get the total count of elements in the underlying model This may load in all possible elements if they have not been already, if the model is page based
 int getEstimatedTotalElementCount()
          Get the total possible count of elements that can be loaded into the underlying model
 int getIndexOfRowFromKey(java.lang.Object key)
           
 int getLoadedElementCount()
          Get the count of elements presently loaded into the underlying model
 int getRangeSize()
          Get the range size of the underlying page based model collection
 int getRangeStart()
          Get the start index of the range of elements the underlying page based model is positioned on
 java.lang.Object getRowKeyAtIndex(int index)
           
 boolean hasNextElement()
          Returns false if the collection model is positioned on the last element in the underlying model
 int iterateOverElements(int startIndex, int count, ICollectionModelElementIndexChangeDelegate listener)
          For some number of elements in a collection, position the evaluation index such that it points to the next element and call a notification through the listener interface.
 void removeCollectionModelListener(ICollectionModelListener listener)
           
 void setModelIndex(int index)
          Set the actual underlying model index to the specified value.
 int setRangeSize(int size)
           
 void setRangeStart(int index)
          Set the start index of the range of elements to position the underlying page based model on
 void setVariableIndex(int index, ICollectionModelElementIndexChangeDelegate listener)
          Set the evaluation index to the specified index for the length of the call.
 void setVariableName(java.lang.String name)
           
 

Method Detail

addCollectionModelListener

void addCollectionModelListener(ICollectionModelListener listener)

removeCollectionModelListener

void removeCollectionModelListener(ICollectionModelListener listener)

getBinding

ControlBinding getBinding()

getElementCount

int getElementCount()
Get the total count of elements in the underlying model This may load in all possible elements if they have not been already, if the model is page based


getEstimatedTotalElementCount

int getEstimatedTotalElementCount()
Get the total possible count of elements that can be loaded into the underlying model


getLoadedElementCount

int getLoadedElementCount()
Get the count of elements presently loaded into the underlying model


hasNextElement

boolean hasNextElement()
Returns false if the collection model is positioned on the last element in the underlying model


iterateOverElements

int iterateOverElements(int startIndex,
                        int count,
                        ICollectionModelElementIndexChangeDelegate listener)
For some number of elements in a collection, position the evaluation index such that it points to the next element and call a notification through the listener interface.

Parameters:
startIndex -
count - the number of elements to iterate over. If negative, will use the default range size
listener -
Returns:
the actual number of elements iterated over (may be less than count if near the end of the collection)

getCurrentModelIndex

int getCurrentModelIndex()
Get the current underlying model index.

Returns:

setModelIndex

void setModelIndex(int index)
Set the actual underlying model index to the specified value.

Parameters:
index -

getRangeSize

int getRangeSize()
Get the range size of the underlying page based model collection

Returns:

setRangeSize

int setRangeSize(int size)

getRangeStart

int getRangeStart()
Get the start index of the range of elements the underlying page based model is positioned on

Returns:
absolute index of the element at the start of the current range

setRangeStart

void setRangeStart(int index)
Set the start index of the range of elements to position the underlying page based model on

Parameters:
index - absolute index of the element to start the next range on

getIndexOfRowFromKey

int getIndexOfRowFromKey(java.lang.Object key)

getRowKeyAtIndex

java.lang.Object getRowKeyAtIndex(int index)

setVariableIndex

void setVariableIndex(int index,
                      ICollectionModelElementIndexChangeDelegate listener)
Set the evaluation index to the specified index for the length of the call.

Parameters:
index -
listener -

setVariableName

void setVariableName(java.lang.String name)

Oracle Fusion Middleware Java API Reference for Oracle ADF Mobile Client
11g Release 1 (11.1.1)

E17503-02

Copyright © 2011, Oracle and/or its affiliates. All rights reserved.