|
||||||||||
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 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,
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 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 ListIterator listIterator()
listIterator
in interface List
public ListIterator listIterator(int index)
listIterator
in interface List
public Iterator iterator()
iterator
in interface Iterable
iterator
in interface Collection
iterator
in interface List
public void add(int index, Object element)
add
in interface List
List.add(int, Object)
public boolean add(Object o)
add
in interface Collection
add
in interface List
Collection.add(Object)
public boolean addAll(Collection c)
addAll
in interface Collection
addAll
in interface List
Collection.addAll(Collection)
public boolean addAll(int index, Collection c)
addAll
in interface List
List.addAll(int, Collection)
public void clear()
clear
in interface Collection
clear
in interface List
Collection.clear()
public boolean contains(Object o)
contains
in interface Collection
contains
in interface List
Collection.contains(Object)
public boolean containsAll(Collection c)
containsAll
in interface Collection
containsAll
in interface List
Collection.containsAll(Collection)
public Object get(int index)
get
in interface List
List.get(int)
public int indexOf(Object o)
indexOf
in interface List
List.indexOf(Object)
public boolean isEmpty()
isEmpty
in interface Collection
isEmpty
in interface List
Collection.isEmpty()
public int lastIndexOf(Object o)
lastIndexOf
in interface List
List.lastIndexOf(Object)
public Object remove(int index)
remove
in interface List
List.remove(int)
public boolean remove(Object o)
remove
in interface Collection
remove
in interface List
Collection.remove(Object)
public boolean removeAll(Collection c)
removeAll
in interface Collection
removeAll
in interface List
Collection.removeAll(Collection)
public boolean retainAll(Collection c)
retainAll
in interface Collection
retainAll
in interface List
Collection.retainAll(Collection)
public Object set(int index, Object element)
set
in interface List
List.set(int, Object)
public int size()
size
in interface Collection
size
in interface List
Collection.size()
public List subList(int fromIndex, int toIndex)
subList
in interface List
public Object[] toArray()
toArray
in interface Collection
toArray
in interface List
public Object[] toArray(Object[] a)
toArray
in interface Collection
toArray
in interface List
Collection.toArray(Object[])
public int getUnfetchedObjects()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |