|
||||||||||
| 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 String |
cacheKey
|
protected ObjectContext |
context
|
protected List |
elements
|
protected int |
pageSize
|
protected Query |
paginatedQuery
|
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,
Object element)
|
boolean |
add(Object o)
|
boolean |
addAll(Collection c)
|
boolean |
addAll(int index,
Collection c)
|
void |
clear()
|
boolean |
contains(Object o)
|
boolean |
containsAll(Collection c)
|
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(Object o)
|
boolean |
isEmpty()
|
Iterator |
iterator()
Return an iterator for this list. |
int |
lastIndexOf(Object o)
|
ListIterator |
listIterator()
Returns a list iterator for this list. |
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. |
Object |
remove(int index)
|
boolean |
remove(Object o)
|
boolean |
removeAll(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(Collection c)
|
Object |
set(int index,
Object element)
|
int |
size()
|
List |
subList(int fromIndex,
int toIndex)
|
Object[] |
toArray()
|
Object[] |
toArray(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 List elements
protected String cacheKey
protected int pageSize
protected int unfetchedObjects
protected Query paginatedQuery
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 ListIterator listIterator()
listIterator in interface Listpublic ListIterator listIterator(int index)
listIterator in interface Listpublic Iterator iterator()
iterator in interface Iterableiterator in interface Collectioniterator in interface List
public void add(int index,
Object element)
add in interface ListList.add(int, Object)public boolean add(Object o)
add in interface Collectionadd in interface ListCollection.add(Object)public boolean addAll(Collection c)
addAll in interface CollectionaddAll in interface ListCollection.addAll(Collection)
public boolean addAll(int index,
Collection c)
addAll in interface ListList.addAll(int, Collection)public void clear()
clear in interface Collectionclear in interface ListCollection.clear()public boolean contains(Object o)
contains in interface Collectioncontains in interface ListCollection.contains(Object)public boolean containsAll(Collection c)
containsAll in interface CollectioncontainsAll in interface ListCollection.containsAll(Collection)public Object get(int index)
get in interface ListList.get(int)public int indexOf(Object o)
indexOf in interface ListList.indexOf(Object)public boolean isEmpty()
isEmpty in interface CollectionisEmpty in interface ListCollection.isEmpty()public int lastIndexOf(Object o)
lastIndexOf in interface ListList.lastIndexOf(Object)public Object remove(int index)
remove in interface ListList.remove(int)public boolean remove(Object o)
remove in interface Collectionremove in interface ListCollection.remove(Object)public boolean removeAll(Collection c)
removeAll in interface CollectionremoveAll in interface ListCollection.removeAll(Collection)public boolean retainAll(Collection c)
retainAll in interface CollectionretainAll in interface ListCollection.retainAll(Collection)
public Object set(int index,
Object element)
set in interface ListList.set(int, Object)public int size()
size in interface Collectionsize in interface ListCollection.size()
public List subList(int fromIndex,
int toIndex)
subList in interface Listpublic Object[] toArray()
toArray in interface CollectiontoArray in interface Listpublic Object[] toArray(Object[] a)
toArray in interface CollectiontoArray in interface ListCollection.toArray(Object[])public int getUnfetchedObjects()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||