SolarMetric Kodo JDO 2.5.0 Reverse Schema Tool

com.solarmetric.rd.kodo.util
Class ProxyVector

java.lang.Object
  |
  +--java.util.AbstractCollection
        |
        +--java.util.AbstractList
              |
              +--java.util.Vector
                    |
                    +--com.solarmetric.rd.kodo.util.ProxyVector
All Implemented Interfaces:
java.lang.Cloneable, java.util.Collection, java.util.List, Proxy, ProxyCollection, java.util.RandomAccess, java.io.Serializable

public class ProxyVector
extends java.util.Vector
implements ProxyCollection

Extension of the Vector 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

Field Summary
 
Fields inherited from class java.util.Vector
capacityIncrement, elementCount, elementData
 
Fields inherited from class java.util.AbstractList
modCount
 
Constructor Summary
ProxyVector()
          Template constructor.
ProxyVector(java.lang.Class elementType)
          Constructor.
ProxyVector(java.util.Collection contents, java.lang.Class elementType)
          Constructor.
 
Method Summary
 void add(int index, java.lang.Object value)
           
 boolean add(java.lang.Object value)
           
 boolean addAll(java.util.Collection values)
           
 boolean addAll(int index, java.util.Collection values)
           
 void addElement(java.lang.Object element)
           
 void clear()
           
 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.
 void insertElementAt(java.lang.Object element, int index)
           
 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()
           
 java.util.ListIterator listIterator()
           
 java.util.ListIterator listIterator(int index)
           
 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.
 java.lang.Object remove(int index)
           
 boolean remove(java.lang.Object o)
           
 boolean removeAll(java.util.Collection c)
           
 void removeAllElements()
           
 boolean removeElement(java.lang.Object element)
           
 void removeElementAt(int index)
           
 boolean retainAll(java.util.Collection c)
           
 java.lang.Object set(int index, java.lang.Object element)
           
 void setElementAt(java.lang.Object element, int index)
           
 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.Vector
capacity, clone, contains, containsAll, copyInto, elementAt, elements, ensureCapacity, equals, firstElement, get, hashCode, indexOf, indexOf, isEmpty, lastElement, lastIndexOf, lastIndexOf, removeRange, setSize, size, subList, toArray, toArray, toString, trimToSize
 
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
 

Constructor Detail

ProxyVector

public ProxyVector()
Template constructor.


ProxyVector

public ProxyVector(java.util.Collection contents,
                   java.lang.Class elementType)
Constructor.

Parameters:
contents - The data that this collection should contain.
elementType - All elements in this collection must be instances of this type.

ProxyVector

public ProxyVector(java.lang.Class elementType)
Constructor.

Parameters:
elementType - All elements 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

addElement

public void addElement(java.lang.Object element)
Overrides:
addElement in class java.util.Vector

insertElementAt

public void insertElementAt(java.lang.Object element,
                            int index)
Overrides:
insertElementAt in class java.util.Vector

removeAllElements

public void removeAllElements()
Overrides:
removeAllElements in class java.util.Vector

removeElement

public boolean removeElement(java.lang.Object element)
Overrides:
removeElement in class java.util.Vector

removeElementAt

public void removeElementAt(int index)
Overrides:
removeElementAt in class java.util.Vector

setElementAt

public void setElementAt(java.lang.Object element,
                         int index)
Overrides:
setElementAt in class java.util.Vector

add

public void add(int index,
                java.lang.Object value)
Specified by:
add in interface java.util.List
Overrides:
add in class java.util.Vector

add

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

addAll

public boolean addAll(int index,
                      java.util.Collection values)
Specified by:
addAll in interface java.util.List
Overrides:
addAll in class java.util.Vector

addAll

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

clear

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

iterator

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

listIterator

public java.util.ListIterator listIterator()
Specified by:
listIterator in interface java.util.List
Overrides:
listIterator in class java.util.AbstractList

listIterator

public java.util.ListIterator listIterator(int index)
Specified by:
listIterator in interface java.util.List
Overrides:
listIterator in class java.util.AbstractList

remove

public java.lang.Object remove(int index)
Specified by:
remove in interface java.util.List
Overrides:
remove in class java.util.Vector

remove

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

removeAll

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

retainAll

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

set

public java.lang.Object set(int index,
                            java.lang.Object element)
Specified by:
set in interface java.util.List
Overrides:
set in class java.util.Vector

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.