|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.apache.cayenne.remote.RemoteIncrementalFaultList
public class RemoteIncrementalFaultList
A list that serves as a container of Persistent objects. It is usually returned by an ObjectContext when a paginated query is performed. Initially only the first "page" of objects is fully resolved. Pages following the first page are resolved on demand. When a list element is accessed, the list would ensure that this element as well as all its siblings on the same page are fully resolved.
The list can hold DataRows or Persistent objects. Attempts to add any other object types will result in an exception.
Certain operations like toArray would trigger full list fetch.
Synchronization Note: this list is not synchronized. All access to it should follow synchronization rules applicable for ArrayList.
| Field Summary | |
|---|---|
protected java.lang.String |
cacheKey
|
protected ObjectContext |
context
|
protected java.util.List |
elements
|
protected QueryMetadata |
metadata
|
protected int |
pageSize
|
protected int |
rowWidth
Stores a hint allowing to distinguish data rows from unfetched ids when the query fetches data rows. |
protected int |
unfetchedObjects
|
| Constructor Summary | |
|---|---|
RemoteIncrementalFaultList(ObjectContext context,
Query paginatedQuery)
|
|
| Method Summary | |
|---|---|
void |
add(int index,
java.lang.Object element)
|
boolean |
add(java.lang.Object o)
|
boolean |
addAll(java.util.Collection c)
|
boolean |
addAll(int index,
java.util.Collection c)
|
void |
clear()
|
boolean |
contains(java.lang.Object o)
|
boolean |
containsAll(java.util.Collection c)
|
java.lang.Object |
get(int index)
|
ObjectContext |
getContext()
Returns ObjectContext associated with this list. |
int |
getPageSize()
Returns the pageSize. |
int |
getUnfetchedObjects()
Returns a total number of objects that are not resolved yet. |
int |
indexOf(java.lang.Object o)
|
boolean |
isEmpty()
|
java.util.Iterator |
iterator()
Return an iterator for this list. |
int |
lastIndexOf(java.lang.Object o)
|
java.util.ListIterator |
listIterator()
Returns a list iterator for this list. |
java.util.ListIterator |
listIterator(int index)
Returns a list iterator of the elements in this list (in proper sequence), starting at the specified position in this list. |
java.lang.Object |
remove(int index)
|
boolean |
remove(java.lang.Object o)
|
boolean |
removeAll(java.util.Collection c)
|
void |
resolveAll()
Will resolve all unread objects. |
protected void |
resolveInterval(int fromIndex,
int toIndex)
Resolves a sublist of objects starting at fromIndex up to but not
including toIndex. |
boolean |
retainAll(java.util.Collection c)
|
java.lang.Object |
set(int index,
java.lang.Object element)
|
int |
size()
|
java.util.List |
subList(int fromIndex,
int toIndex)
|
java.lang.Object[] |
toArray()
|
java.lang.Object[] |
toArray(java.lang.Object[] a)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface java.util.List |
|---|
equals, hashCode |
| Field Detail |
|---|
protected java.util.List elements
protected java.lang.String cacheKey
protected int pageSize
protected int unfetchedObjects
protected QueryMetadata metadata
protected transient ObjectContext context
protected int rowWidth
| Constructor Detail |
|---|
public RemoteIncrementalFaultList(ObjectContext context,
Query paginatedQuery)
| Method Detail |
|---|
public void resolveAll()
protected void resolveInterval(int fromIndex,
int toIndex)
fromIndex up to but not
including toIndex. Internally performs bound checking and trims
indexes accordingly.
public ObjectContext getContext()
public int getPageSize()
public java.util.ListIterator listIterator()
listIterator in interface java.util.Listpublic java.util.ListIterator listIterator(int index)
listIterator in interface java.util.Listpublic java.util.Iterator iterator()
iterator in interface java.lang.Iterableiterator in interface java.util.Collectioniterator in interface java.util.List
public void add(int index,
java.lang.Object element)
add in interface java.util.ListList.add(int, Object)public boolean add(java.lang.Object o)
add in interface java.util.Collectionadd in interface java.util.ListCollection.add(Object)public boolean addAll(java.util.Collection c)
addAll in interface java.util.CollectionaddAll in interface java.util.ListCollection.addAll(Collection)
public boolean addAll(int index,
java.util.Collection c)
addAll in interface java.util.ListList.addAll(int, Collection)public void clear()
clear in interface java.util.Collectionclear in interface java.util.ListCollection.clear()public boolean contains(java.lang.Object o)
contains in interface java.util.Collectioncontains in interface java.util.ListCollection.contains(Object)public boolean containsAll(java.util.Collection c)
containsAll in interface java.util.CollectioncontainsAll in interface java.util.ListCollection.containsAll(Collection)public java.lang.Object get(int index)
get in interface java.util.ListList.get(int)public int indexOf(java.lang.Object o)
indexOf in interface java.util.ListList.indexOf(Object)public boolean isEmpty()
isEmpty in interface java.util.CollectionisEmpty in interface java.util.ListCollection.isEmpty()public int lastIndexOf(java.lang.Object o)
lastIndexOf in interface java.util.ListList.lastIndexOf(Object)public java.lang.Object remove(int index)
remove in interface java.util.ListList.remove(int)public boolean remove(java.lang.Object o)
remove in interface java.util.Collectionremove in interface java.util.ListCollection.remove(Object)public boolean removeAll(java.util.Collection c)
removeAll in interface java.util.CollectionremoveAll in interface java.util.ListCollection.removeAll(Collection)public boolean retainAll(java.util.Collection c)
retainAll in interface java.util.CollectionretainAll in interface java.util.ListCollection.retainAll(Collection)
public java.lang.Object set(int index,
java.lang.Object element)
set in interface java.util.ListList.set(int, Object)public int size()
size in interface java.util.Collectionsize in interface java.util.ListCollection.size()
public java.util.List subList(int fromIndex,
int toIndex)
subList in interface java.util.Listpublic java.lang.Object[] toArray()
toArray in interface java.util.CollectiontoArray in interface java.util.Listpublic java.lang.Object[] toArray(java.lang.Object[] a)
toArray in interface java.util.CollectiontoArray in interface java.util.ListCollection.toArray(Object[])public int getUnfetchedObjects()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||