|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.cayenne.access.ToManyList
public class ToManyList
A list that holds objects for to-many relationships. All operations, except for resolving the list from DB, are not synchronized. The safest way to implement custom synchronization is to synchronize on parent ObjectStore.
| Constructor Summary | |
|---|---|
ToManyList(Persistent source,
String relationship)
Creates ToManyList. |
|
| 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)
|
boolean |
equals(Object o)
|
Object |
get(int index)
|
String |
getRelationship()
Returns a name of relationship for this list. |
Persistent |
getRelationshipOwner()
|
Object |
getValue()
Returns an object stored by this ValueHolder. |
Object |
getValueDirectly()
Retrieves ValueHolder value without triggering fault resolution. |
int |
hashCode()
|
int |
indexOf(Object o)
|
void |
invalidate()
Turns a ValueHolder into a fault. |
boolean |
isEmpty()
|
boolean |
isFault()
Returns true if the internal value is not yet resolved. |
Iterator |
iterator()
|
int |
lastIndexOf(Object o)
|
ListIterator |
listIterator()
|
ListIterator |
listIterator(int index)
|
Object |
remove(int index)
|
boolean |
remove(Object o)
|
boolean |
removeAll(Collection c)
|
boolean |
retainAll(Collection c)
|
Object |
set(int index,
Object element)
|
void |
setObjectList(List objectList)
|
Object |
setValue(Object value)
Sets an object stored by this ValueHolder. |
Object |
setValueDirectly(Object value)
Sets ValueHolder vaue without triggering fault resolution. |
int |
size()
|
List |
subList(int fromIndex,
int toIndex)
|
Object[] |
toArray()
|
Object[] |
toArray(Object[] a)
|
String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public ToManyList(Persistent source,
String relationship)
| Method Detail |
|---|
public Persistent getRelationshipOwner()
public String getRelationship()
public void setObjectList(List objectList)
public Object getValue()
throws CayenneRuntimeException
ValueHolder
getValue in interface ValueHolderCayenneRuntimeExceptionpublic void invalidate()
ValueHolder
invalidate in interface ValueHolderpublic boolean isFault()
ValueHolder
isFault in interface ValueHolder
public Object getValueDirectly()
throws CayenneRuntimeException
ValueHolder
getValueDirectly in interface ValueHolderCayenneRuntimeException
public Object setValueDirectly(Object value)
throws CayenneRuntimeException
ValueHolder
setValueDirectly in interface ValueHolderCayenneRuntimeException
public Object setValue(Object value)
throws CayenneRuntimeException
ValueHolder
setValue in interface ValueHoldervalue - a new value of the ValueHolder.
CayenneRuntimeExceptionpublic boolean add(Object o)
add in interface Collectionadd in interface List
public void add(int index,
Object element)
add in interface Listpublic boolean addAll(Collection c)
addAll in interface CollectionaddAll in interface List
public boolean addAll(int index,
Collection c)
addAll in interface Listpublic void clear()
clear in interface Collectionclear in interface Listpublic boolean contains(Object o)
contains in interface Collectioncontains in interface Listpublic boolean containsAll(Collection c)
containsAll in interface CollectioncontainsAll in interface Listpublic boolean equals(Object o)
equals in interface Collectionequals in interface Listequals in class Objectpublic int hashCode()
hashCode in interface CollectionhashCode in interface ListhashCode in class Objectpublic Object get(int index)
get in interface Listpublic int indexOf(Object o)
indexOf in interface Listpublic boolean isEmpty()
isEmpty in interface CollectionisEmpty in interface Listpublic Iterator iterator()
iterator in interface Iterableiterator in interface Collectioniterator in interface Listpublic int lastIndexOf(Object o)
lastIndexOf in interface Listpublic ListIterator listIterator()
listIterator in interface Listpublic ListIterator listIterator(int index)
listIterator in interface Listpublic Object remove(int index)
remove in interface Listpublic boolean remove(Object o)
remove in interface Collectionremove in interface Listpublic boolean removeAll(Collection c)
removeAll in interface CollectionremoveAll in interface Listpublic boolean retainAll(Collection c)
retainAll in interface CollectionretainAll in interface List
public Object set(int index,
Object element)
set in interface Listpublic int size()
size in interface Collectionsize in interface List
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 Listpublic String toString()
toString in class Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||