|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.util.AbstractCollection<E>
java.util.AbstractSet<E>
java.util.HashSet
org.apache.openjpa.util.ProxyHashSet
public class ProxyHashSet
Extension of the HashSet 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 dirty for one state
change if one mutator method of the base type calls another.
| Constructor Summary | |
|---|---|
ProxyHashSet()
|
|
ProxyHashSet(Class elementType,
boolean trackChanges,
OpenJPAConfiguration conf)
|
|
| Method Summary | |
|---|---|
boolean |
add(Object value)
|
boolean |
addAll(Collection values)
|
void |
clear()
|
Object |
copy(Object orig)
Return an unproxied copy of the given instance. |
ChangeTracker |
getChangeTracker()
Return the change tracker for this proxy, or null if none. |
OpenJPAStateManager |
getOwner()
Return the owning object. |
int |
getOwnerField()
Return the owning field index. |
Iterator |
iterator()
|
ProxyCollection |
newInstance(Class elementType,
Comparator compare,
boolean trackChanges,
OpenJPAConfiguration conf)
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 |
setOwner(OpenJPAStateManager sm,
int field)
Reset the state of the proxy, and set the owning instance of the proxy and the name of the field it is assigned to. |
protected Object |
writeReplace()
|
| Methods inherited from class java.util.HashSet |
|---|
clone, contains, isEmpty, size |
| 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.Set |
|---|
containsAll, equals, hashCode, toArray, toArray |
| Constructor Detail |
|---|
public ProxyHashSet()
public ProxyHashSet(Class elementType,
boolean trackChanges,
OpenJPAConfiguration conf)
| Method Detail |
|---|
public void setOwner(OpenJPAStateManager sm,
int field)
Proxy
setOwner in interface Proxypublic OpenJPAStateManager getOwner()
Proxy
getOwner in interface Proxypublic int getOwnerField()
Proxy
getOwnerField in interface Proxypublic ChangeTracker getChangeTracker()
Proxy
getChangeTracker in interface Proxypublic Object copy(Object orig)
Proxy
copy in interface Proxy
public ProxyCollection newInstance(Class elementType,
Comparator compare,
boolean trackChanges,
OpenJPAConfiguration conf)
ProxyCollectionProxyManager 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.
newInstance in interface ProxyCollectionpublic boolean add(Object value)
add in interface Collectionadd in interface Setadd in class HashSetpublic boolean addAll(Collection values)
addAll in interface CollectionaddAll in interface SetaddAll in class AbstractCollectionpublic void clear()
clear in interface Collectionclear in interface Setclear in class HashSetpublic Iterator iterator()
iterator in interface Iterableiterator in interface Collectioniterator in interface Setiterator in class HashSetpublic boolean remove(Object o)
remove in interface Collectionremove in interface Setremove in class HashSetpublic boolean removeAll(Collection c)
removeAll in interface CollectionremoveAll in interface SetremoveAll in class AbstractSetpublic boolean retainAll(Collection c)
retainAll in interface CollectionretainAll in interface SetretainAll in class AbstractCollection
protected Object writeReplace()
throws ObjectStreamException
ObjectStreamException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||