Overview | Package | Class | Tree | Serialized | Deprecated | Index | Help
| SolarMetric Kodo JDO 2.4.3 generated on March 27 2003
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.solarmetric.kodo.util
Class ProxyTreeSet

    java.lang.Object
      |
      +--java.util.AbstractCollection
            |
            +--java.util.AbstractSet
                  |
                  +--java.util.TreeSet
                        |
                        +--com.solarmetric.kodo.util.ProxyTreeSet

All Implemented Interfaces:
  Cloneable, Collection, Proxy, ProxyCollection, Serializable, Set, SortedSet

Direct Known Subclasses:
  ProxyTreeSetCT

public class ProxyTreeSet
extends TreeSet
implements ProxyCollection

Extension of the `TreeSet` type that dirties the persistent/transactional field it is assigned to on modification. The need to dirty the field on any modification mandates that this class must override all mutator methods of the base type. This may lead to multiple calls to the `PersistenceCapable.jdoMakeDirty(java.lang.String)` for one state change if one mutator method of the base type calls another.

See Also:
  Serialized Form

Constructor Summary
`ProxyTreeSet()` Template constructor.
`ProxyTreeSet(Comparator comp, Class elementType)` Constructor.

Method Summary
`boolean` | `add(Object value)`
`boolean` | `addAll(Collection values)`
`void` | `clear()`
`Collection` | `getAdded()`
`ChangeManager` | `getChangeManager()`
`Comparator` | `getComparator()` Return the comparator used in this collection, or null if it is unordered or uses natural ordering.
`Collection` | `getCopy(Collection orig)` This method should return a copy of the given collection; the copy should be of the same class as the superclass of this collection.
`Object` | `getOwner()` Return the owning object.
`String` | `getOwnerFieldName()` Return the owning field name.
`Collection` | `getRemoved()`
`Iterator` | `iterator()`
`ProxyCollection` | `newInstance(Class elementType, Collection contents, Comparator compare)` This method should return a new proxy of the same concrete type as the implementing class.
`boolean` | `remove(Object o)`
`boolean` | `removeAll(Collection c)`
`boolean` | `retainAll(Collection c)`
`void` | `setChangeManager(ChangeManager cm)`
`void` | `setOwner(Object pc, String fieldName)` Set the owning JDO instance of the proxy and the name of the field it is assigned to.
`protected Object` | `writeReplace()`

Methods inherited from class java.util.TreeSet
`clone, comparator, contains, first, headSet, isEmpty, last, size, subSet, tailSet`

Methods inherited from class java.util.AbstractSet
`equals, hashCode`

Methods inherited from class java.util.AbstractCollection
`containsAll, toArray, toArray, toString`

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

Methods inherited from interface java.util.Collection
`contains, containsAll, equals, hashCode, isEmpty, size, toArray, toArray`

Methods inherited from interface java.util.Set
`containsAll, equals, hashCode, toArray, toArray`

Constructor Detail

### ProxyTreeSet

    public ProxyTreeSet()

  Template constructor.

### ProxyTreeSet

    public ProxyTreeSet(Comparator comp,
                        Class elementType)

  Constructor.
  Parameters:
    `comp` - The comparator that should be used to determine the sort order of the elements in this collection.
    `elementType` - All keys in this collection must be instances of this type.

Method Detail

### newInstance

    public ProxyCollection newInstance(Class elementType,
                                       Collection contents,
                                       Comparator compare)

  Description copied from interface: `ProxyCollection`
  This method should return a new proxy of the same concrete type as the implementing class. Used by the `ProxyManager` factories: one template instance of each type is created for the purpose of producing new instances via this method. Overcomes the performance penalties of reflection.
  Specified by:
    `newInstance` in interface `ProxyCollection`

### getCopy

    public Collection getCopy(Collection orig)

  Description copied from interface: `ProxyCollection`
  This method should return a copy of the given collection; the copy should be of the same class as the superclass of this collection.
  Specified by:
    `getCopy` in interface `ProxyCollection`

### getComparator

    public Comparator getComparator()

  Description copied from interface: `ProxyCollection`
  Return the comparator used in this collection, or null if it is unordered or uses natural ordering.
  Specified by:
    `getComparator` in interface `ProxyCollection`

### setOwner

    public void setOwner(Object pc,
                         String fieldName)

  Description copied from interface: `Proxy`
  Set the owning JDO instance of the proxy and the name of the field it is assigned to. Set to null to indicate that the proxy is no longer managed.
  Specified by:
    `setOwner` in interface `Proxy`

### getOwner

    public Object getOwner()

  Description copied from interface: `Proxy`
  Return the owning object.
  Specified by:
    `getOwner` in interface `Proxy`

### getOwnerFieldName

    public String getOwnerFieldName()

  Description copied from interface: `Proxy`
  Return the owning field name.
  Specified by:
    `getOwnerFieldName` in interface `Proxy`

### getChangeManager

    public ChangeManager getChangeManager()

### setChangeManager

    public void setChangeManager(ChangeManager cm)

### getRemoved

    public Collection getRemoved()

### getAdded

    public Collection getAdded()

### add

    public boolean add(Object value)

  Specified by:
    `add` in interface `Collection`
  Overrides:
    `add` in class `TreeSet`

### addAll

    public boolean addAll(Collection values)

  Specified by:
    `addAll` in interface `Collection`
  Overrides:
    `addAll` in class `TreeSet`

### clear

    public void clear()

  Specified by:
    `clear` in interface `Collection`
  Overrides:
    `clear` in class `TreeSet`

### iterator

    public Iterator iterator()

  Specified by:
    `iterator` in interface `Collection`
  Overrides:
    `iterator` in class `TreeSet`

### remove

    public boolean remove(Object o)

  Specified by:
    `remove` in interface `Collection`
  Overrides:
    `remove` in class `TreeSet`

### removeAll

    public boolean removeAll(Collection c)

  Specified by:
    `removeAll` in interface `Collection`
  Overrides:
    `removeAll` in class `AbstractSet`

### retainAll

    public boolean retainAll(Collection c)

  Specified by:
    `retainAll` in interface `Collection`
  Overrides:
    `retainAll` in class `AbstractCollection`

### writeReplace

    protected Object writeReplace()
                           throws ObjectStreamException

Overview | Package | Class | Tree | Serialized | Deprecated | Index | Help
| SolarMetric Kodo JDO 2.4.3 generated on March 27 2003
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright 2001,2002 SolarMetric, Inc. All Rights Reserved.