SolarMetric Kodo JDO 2.5.0 Reverse Schema Tool

com.solarmetric.rd.kodo.util
Class ProxyTreeSet

java.lang.Object
  |
  +--java.util.AbstractCollection
        |
        +--java.util.AbstractSet
              |
              +--java.util.TreeSet
                    |
                    +--com.solarmetric.rd.kodo.util.ProxyTreeSet
All Implemented Interfaces:
java.lang.Cloneable, java.util.Collection, Proxy, ProxyCollection, java.io.Serializable, java.util.Set, java.util.SortedSet
Direct Known Subclasses:
ProxyTreeSetCT

public class ProxyTreeSet
extends java.util.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(java.util.Comparator comp, java.lang.Class elementType)
          Constructor.
 
Method Summary
 boolean add(java.lang.Object value)
           
 boolean addAll(java.util.Collection values)
           
 void clear()
           
 java.util.Collection getAdded()
           
 com.solarmetric.rd.kodo.util.ChangeManager getChangeManager()
           
 java.util.Comparator getComparator()
          Return the comparator used in this collection, or null if it is unordered or uses natural ordering.
 java.util.Collection getCopy(java.util.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.
 java.lang.Object getOwner()
          Return the owning object.
 java.lang.String getOwnerFieldName()
          Return the owning field name.
 java.util.Collection getRemoved()
           
 boolean isOwner(java.lang.Object pc, java.lang.String fieldName)
          Return true if the given object and field name match the owner of this proxy.
 java.util.Iterator iterator()
           
 com.solarmetric.rd.kodo.util.ProxyCollection newInstance(java.lang.Class elementType, java.util.Collection contents, java.util.Comparator compare)
          This method should return a new proxy of the same concrete type as the implementing class.
 boolean remove(java.lang.Object o)
           
 boolean removeAll(java.util.Collection c)
           
 boolean retainAll(java.util.Collection c)
           
 void setChangeManager(com.solarmetric.rd.kodo.util.ChangeManager cm)
           
 void setOwner(java.lang.Object pc, java.lang.String fieldName)
          Set the owning JDO instance of the proxy and the name of the field it is assigned to.
protected  java.lang.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(java.util.Comparator comp,
                    java.lang.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 com.solarmetric.rd.kodo.util.ProxyCollection newInstance(java.lang.Class elementType,
                                                                java.util.Collection contents,
                                                                java.util.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 java.util.Collection getCopy(java.util.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 java.util.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(java.lang.Object pc,
                     java.lang.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 java.lang.Object getOwner()
Description copied from interface: Proxy
Return the owning object.

Specified by:
getOwner in interface Proxy

getOwnerFieldName

public java.lang.String getOwnerFieldName()
Description copied from interface: Proxy
Return the owning field name.

Specified by:
getOwnerFieldName in interface Proxy

isOwner

public boolean isOwner(java.lang.Object pc,
                       java.lang.String fieldName)
Description copied from interface: Proxy
Return true if the given object and field name match the owner of this proxy.

Specified by:
isOwner in interface Proxy

getChangeManager

public com.solarmetric.rd.kodo.util.ChangeManager getChangeManager()

setChangeManager

public void setChangeManager(com.solarmetric.rd.kodo.util.ChangeManager cm)

getRemoved

public java.util.Collection getRemoved()

getAdded

public java.util.Collection getAdded()

add

public boolean add(java.lang.Object value)
Specified by:
add in interface java.util.Collection
Overrides:
add in class java.util.TreeSet

addAll

public boolean addAll(java.util.Collection values)
Specified by:
addAll in interface java.util.Collection
Overrides:
addAll in class java.util.TreeSet

clear

public void clear()
Specified by:
clear in interface java.util.Collection
Overrides:
clear in class java.util.TreeSet

iterator

public java.util.Iterator iterator()
Specified by:
iterator in interface java.util.Collection
Overrides:
iterator in class java.util.TreeSet

remove

public boolean remove(java.lang.Object o)
Specified by:
remove in interface java.util.Collection
Overrides:
remove in class java.util.TreeSet

removeAll

public boolean removeAll(java.util.Collection c)
Specified by:
removeAll in interface java.util.Collection
Overrides:
removeAll in class java.util.AbstractSet

retainAll

public boolean retainAll(java.util.Collection c)
Specified by:
retainAll in interface java.util.Collection
Overrides:
retainAll in class java.util.AbstractCollection

writeReplace

protected java.lang.Object writeReplace()
                                 throws java.io.ObjectStreamException
java.io.ObjectStreamException

SolarMetric Kodo JDO 2.5.0 Reverse Schema Tool

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