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

E17503-02

oracle.jbo.server
Class QueryCollection

java.lang.Object
  extended by oracle.jbo.server.QueryCollection
All Implemented Interfaces:
PCollListener

public final class QueryCollection
extends java.lang.Object
implements PCollListener


Field Summary
static java.lang.Class CLASS_INSTANCE
           
 
Constructor Summary
QueryCollection(ViewObjectImpl vo)
           
QueryCollection(ViewRowSetImpl rowSet)
           
 
Method Summary
 void add(int index, java.lang.Object row)
          Add a row to the QueryCollection at the specified index.
 void afterActivateElement(PCollection pcoll, PCollPersistable elem)
           
protected  void afterRemove(EntityImpl entity)
          Removes the ViewRow from cache and collection
 void beforePassivateElement(PCollection pcoll, PCollPersistable elem)
           
 boolean cancelQuery()
           
protected  Row[] findMatchingRows(java.lang.Object[] keyValues, AttributeDefImpl[] keyAttrs)
           
 int getCollectionSize()
           
 java.lang.Object[] getFilterParamValues(ViewRowImpl viewRow, java.lang.Object[] newVals, int[] newValIndices)
           
 ArrayList getNewRowTracker()
           
 long getNextObjId()
           
 int getNumUserParams()
           
 ResultSet getResultSet()
           
 RowFilter getRowFilter()
           
protected  Row[] getRows(EntityImpl row)
           
protected  Row[] getRows(Key ky)
           
 ViewRowSetImpl getRowSetImpl()
           
 oracle.jbo.server.ViewRowStorage getRowStorageFromId(long id)
           
 int indexOf(java.lang.Object row)
           
 boolean isExecuted()
           
 void printActiveObjsTab(PrintWriter pw)
           
 void printColl(PrintWriter pw, int printFlag)
           
 void printRUChain(PrintWriter pw)
           
 java.lang.Object remove(int index)
          Remove a row from the QueryCollection at the specified index.
 java.lang.Object removeAndRetain(int index)
           
 java.lang.Object removeFromCollection(int index)
           
protected  void removeReference(ViewRowImpl row, EntityImpl entity)
          Remove entity references, i.e, set references to null
 int size()
          The size of the Collection.
protected  void updateReference(ViewRowImpl row, EntityImpl entity, int entityIndex)
          Set reference entity based on foreign keys
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CLASS_INSTANCE

public static final java.lang.Class CLASS_INSTANCE
Constructor Detail

QueryCollection

public QueryCollection(ViewObjectImpl vo)

QueryCollection

public QueryCollection(ViewRowSetImpl rowSet)
Method Detail

findMatchingRows

protected Row[] findMatchingRows(java.lang.Object[] keyValues,
                                 AttributeDefImpl[] keyAttrs)

getRows

protected Row[] getRows(Key ky)

add

public void add(int index,
                java.lang.Object row)
Add a row to the QueryCollection at the specified index.

Parameters:
index - the insertion index or -ve to insert at the end.
row - a ViewRow row to be inserted into the QueryCollection.

getRowSetImpl

public ViewRowSetImpl getRowSetImpl()

getRowFilter

public RowFilter getRowFilter()

getNextObjId

public long getNextObjId()
Specified by:
getNextObjId in interface PCollListener

getRowStorageFromId

public oracle.jbo.server.ViewRowStorage getRowStorageFromId(long id)

isExecuted

public final boolean isExecuted()

getRows

protected Row[] getRows(EntityImpl row)
Returns:
a list for ViewRows that reference the entity

getNewRowTracker

public ArrayList getNewRowTracker()

updateReference

protected void updateReference(ViewRowImpl row,
                               EntityImpl entity,
                               int entityIndex)
Set reference entity based on foreign keys


getFilterParamValues

public java.lang.Object[] getFilterParamValues(ViewRowImpl viewRow,
                                               java.lang.Object[] newVals,
                                               int[] newValIndices)

getResultSet

public ResultSet getResultSet()

afterActivateElement

public void afterActivateElement(PCollection pcoll,
                                 PCollPersistable elem)
Specified by:
afterActivateElement in interface PCollListener

beforePassivateElement

public void beforePassivateElement(PCollection pcoll,
                                   PCollPersistable elem)
Specified by:
beforePassivateElement in interface PCollListener

getNumUserParams

public int getNumUserParams()

size

public int size()
The size of the Collection. Implementation of the Collection interface.

--Calling this method will result in the entire Collection being --brought into memory (in order to give an accurate count of the --rows in it). THIS HAS CHANGED. THE NEW BEHAVIOR IS : We're currently returning only the fetched size of the query collection We could return the correct size, if atleast one row is fetched, however we should NOT return correct size if no rows are fetched (and thereby getting all rows in memory as AbstractList.hash() performs hasNext() that performs size() leading to fetching all row at the very beginning of iteration). - modified during move to AbstractList from Vector.

Returns:
the number of rows in the collection.

indexOf

public int indexOf(java.lang.Object row)

getCollectionSize

public int getCollectionSize()

remove

public java.lang.Object remove(int index)
Remove a row from the QueryCollection at the specified index.

Parameters:
index - the deletion index.
Returns:
the row removed.

removeFromCollection

public java.lang.Object removeFromCollection(int index)

removeAndRetain

public java.lang.Object removeAndRetain(int index)

afterRemove

protected void afterRemove(EntityImpl entity)
Removes the ViewRow from cache and collection


removeReference

protected void removeReference(ViewRowImpl row,
                               EntityImpl entity)
Remove entity references, i.e, set references to null


printActiveObjsTab

public void printActiveObjsTab(PrintWriter pw)

printRUChain

public void printRUChain(PrintWriter pw)

printColl

public void printColl(PrintWriter pw,
                      int printFlag)

cancelQuery

public boolean cancelQuery()

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.