Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.cayenne.util
Class PersistentObjectSet

    java.lang.Object
      org.apache.cayenne.util.RelationshipFault
          org.apache.cayenne.util.PersistentObjectSet

All Implemented Interfaces:
  Serializable, Iterable, Collection, Set, ValueHolder

    public class PersistentObjectSet

extends RelationshipFault
implements Set, ValueHolder

Since:
  3.0
Author:
  Andrus Adamchik
See Also:
  Serialized Form

Field Summary
`protected Set` | `addedToUnresolved`
`protected Set` | `objectSet`
`protected Set` | `removedFromUnresolved`

Fields inherited from class org.apache.cayenne.util.RelationshipFault
`relationshipName, relationshipOwner`

Constructor Summary
`PersistentObjectSet(Persistent relationshipOwner, String relationshipName)`

Method Summary
`boolean` | `add(Object o)`
`boolean` | `addAll(Collection c)`
`void` | `clear()`
`boolean` | `contains(Object o)`
`boolean` | `containsAll(Collection c)`
`boolean` | `equals(Object o)`
`Object` | `getValue()` Returns an object stored by this ValueHolder.
`Object` | `getValueDirectly()` Retrieves ValueHolder value without triggering fault resolution.
`int` | `hashCode()`
`void` | `invalidate()` Turns itself into a fault, thus forcing a refresh on the next access.
`boolean` | `isEmpty()`
`boolean` | `isFault()` Returns whether this list is not yet resolved and requires a fetch.
`Iterator` | `iterator()`
`boolean` | `remove(Object o)`
`boolean` | `removeAll(Collection c)`
`protected Set` | `resolvedObjectSet()` Returns internal objects list resolving it if needed.
`boolean` | `retainAll(Collection c)`
`void` | `setObjectSet(Set objectSet)`
`Object` | `setValue(Object value)` Sets an object stored by this ValueHolder.
`Object` | `setValueDirectly(Object value)` Sets ValueHolder vaue without triggering fault resolution.
`int` | `size()`
`Object[]` | `toArray()`
`Object[]` | `toArray(Object[] a)`
`String` | `toString()`

Methods inherited from class org.apache.cayenne.util.RelationshipFault
`getRelationshipName, getRelationshipOwner, isTransientParent, isUncommittedParent, resolveFromDB`

Methods inherited from class java.lang.Object
`clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

Field Detail

### objectSet

    protected Set objectSet

### addedToUnresolved

    protected Set addedToUnresolved

### removedFromUnresolved

    protected Set removedFromUnresolved

Constructor Detail

### PersistentObjectSet

    public PersistentObjectSet(Persistent relationshipOwner,
                               String relationshipName)

Method Detail

### isFault

    public boolean isFault()

  Returns whether this list is not yet resolved and requires a fetch.

  Specified by:
    `isFault` in interface `ValueHolder`

### invalidate

    public void invalidate()

  Turns itself into a fault, thus forcing a refresh on the next access.

  Specified by:
    `invalidate` in interface `ValueHolder`

### setValueDirectly

    public Object setValueDirectly(Object value)
                            throws CayenneRuntimeException

  Description copied from interface: `ValueHolder`
  Sets ValueHolder vaue without triggering fault resolution.

  Specified by:
    `setValueDirectly` in interface `ValueHolder`
  Throws:
    `CayenneRuntimeException`

### getValue

    public Object getValue()
                    throws CayenneRuntimeException

  Description copied from interface: `ValueHolder`
  Returns an object stored by this ValueHolder.

  Specified by:
    `getValue` in interface `ValueHolder`
  Throws:
    `CayenneRuntimeException`

### getValueDirectly

    public Object getValueDirectly()
                            throws CayenneRuntimeException

  Description copied from interface: `ValueHolder`
  Retrieves ValueHolder value without triggering fault resolution.

  Specified by:
    `getValueDirectly` in interface `ValueHolder`
  Throws:
    `CayenneRuntimeException`

### setValue

    public Object setValue(Object value)
                    throws CayenneRuntimeException

  Description copied from interface: `ValueHolder`
  Sets an object stored by this ValueHolder.

  Specified by:
    `setValue` in interface `ValueHolder`
  Parameters:
    `value` - a new value of the ValueHolder.
  Returns:
    a previous value saved in the ValueHolder.
  Throws:
    `CayenneRuntimeException`

### setObjectSet

    public void setObjectSet(Set objectSet)

### add

    public boolean add(Object o)

  Specified by:
    `add` in interface `Collection`
  Specified by:
    `add` in interface `Set`

### addAll

    public boolean addAll(Collection c)

  Specified by:
    `addAll` in interface `Collection`
  Specified by:
    `addAll` in interface `Set`

### clear

    public void clear()

  Specified by:
    `clear` in interface `Collection`
  Specified by:
    `clear` in interface `Set`

### contains

    public boolean contains(Object o)

  Specified by:
    `contains` in interface `Collection`
  Specified by:
    `contains` in interface `Set`

### containsAll

    public boolean containsAll(Collection c)

  Specified by:
    `containsAll` in interface `Collection`
  Specified by:
    `containsAll` in interface `Set`

### equals

    public boolean equals(Object o)

  Specified by:
    `equals` in interface `Collection`
  Specified by:
    `equals` in interface `Set`
  Overrides:
    `equals` in class `Object`

### hashCode

    public int hashCode()

  Specified by:
    `hashCode` in interface `Collection`
  Specified by:
    `hashCode` in interface `Set`
  Overrides:
    `hashCode` in class `Object`

### isEmpty

    public boolean isEmpty()

  Specified by:
    `isEmpty` in interface `Collection`
  Specified by:
    `isEmpty` in interface `Set`

### iterator

    public Iterator iterator()

  Specified by:
    `iterator` in interface `Iterable`
  Specified by:
    `iterator` in interface `Collection`
  Specified by:
    `iterator` in interface `Set`

### remove

    public boolean remove(Object o)

  Specified by:
    `remove` in interface `Collection`
  Specified by:
    `remove` in interface `Set`

### removeAll

    public boolean removeAll(Collection c)

  Specified by:
    `removeAll` in interface `Collection`
  Specified by:
    `removeAll` in interface `Set`

### retainAll

    public boolean retainAll(Collection c)

  Specified by:
    `retainAll` in interface `Collection`
  Specified by:
    `retainAll` in interface `Set`

### size

    public int size()

  Specified by:
    `size` in interface `Collection`
  Specified by:
    `size` in interface `Set`

### toArray

    public Object[] toArray()

  Specified by:
    `toArray` in interface `Collection`
  Specified by:
    `toArray` in interface `Set`

### toArray

    public Object[] toArray(Object[] a)

  Specified by:
    `toArray` in interface `Collection`
  Specified by:
    `toArray` in interface `Set`

### resolvedObjectSet

    protected Set resolvedObjectSet()

  Returns internal objects list resolving it if needed.

### toString

    public String toString()

  Overrides:
    `toString` in class `Object`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2001-2007 Apache Cayenne. All Rights Reserved.