SolarMetric Kodo JDO 2.5.8 generated on January 11 2004

com.solarmetric.kodo.util
Class SimpleProxyManager

java.lang.Object
  |
  +--com.solarmetric.kodo.util.SimpleProxyManager
All Implemented Interfaces:
ProxyManager

public class SimpleProxyManager
extends Object
implements ProxyManager

Simple implementation of the ProxyManager interface that delegates to the Proxies utility class in this package.


Field Summary
protected static Localizer _loc
           
 
Constructor Summary
SimpleProxyManager()
           
 
Method Summary
 Object getArrayCopy(Object orig, Object owner, String field)
          Return a new array of the same component type as the given array and containing the same elements.
 Collection getCollectionCopy(Collection orig, Object owner, String field)
          Return a new collection of the same type as the given one with a copy of all contained elements.
 ProxyCollection getCollectionProxy(Class type, Class elementType, Collection contents, Comparator compare, Object owner, String field)
          Return a proxy for the given collection type.
 Object getCustomCopy(Object orig, Object owner, String field)
          Return a copy of the given object with the same information.
 Proxy getCustomProxy(Object orig, Object owner, String field)
          Return a proxy for the given object.
 Date getDateCopy(Date orig, Object owner, String field)
          Return a copy of the given date with the same information.
 ProxyDate getDateProxy(Date date, Object owner, String field)
          Return a proxy for the given date instance.
 Map getMapCopy(Map orig, Object owner, String field)
          Return a new map of the same type as the given one with a copy of all contained key/value pairs.
 ProxyMap getMapProxy(Class type, Class keyType, Class valueType, Map contents, Comparator compare, Object owner, String field)
          Return a proxy for the given map type.
 boolean isCustomProxyType(Class cls)
          Return true if cls is a type that is handled by getCustomCopy(java.lang.Object, java.lang.Object, java.lang.String) or getCustomProxy(java.lang.Object, java.lang.Object, java.lang.String).
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

_loc

protected static Localizer _loc
Constructor Detail

SimpleProxyManager

public SimpleProxyManager()
Method Detail

isCustomProxyType

public boolean isCustomProxyType(Class cls)
Description copied from interface: ProxyManager
Return true if cls is a type that is handled by ProxyManager.getCustomCopy(java.lang.Object, java.lang.Object, java.lang.String) or ProxyManager.getCustomProxy(java.lang.Object, java.lang.Object, java.lang.String).
Specified by:
isCustomProxyType in interface ProxyManager

getDateCopy

public Date getDateCopy(Date orig,
                        Object owner,
                        String field)
Description copied from interface: ProxyManager
Return a copy of the given date with the same information. If the given date is proxied, the returned instance will be the correct non-proxied type.
Specified by:
getDateCopy in interface ProxyManager

getCollectionCopy

public Collection getCollectionCopy(Collection orig,
                                    Object owner,
                                    String field)
Description copied from interface: ProxyManager
Return a new collection of the same type as the given one with a copy of all contained elements. If the given type is a proxy type, the returned instance will be of the correct non-proxied type.
Specified by:
getCollectionCopy in interface ProxyManager

getMapCopy

public Map getMapCopy(Map orig,
                      Object owner,
                      String field)
Description copied from interface: ProxyManager
Return a new map of the same type as the given one with a copy of all contained key/value pairs. If the given type is a proxy type, the returned instance will be of the correct non-proxied type.
Specified by:
getMapCopy in interface ProxyManager

getArrayCopy

public Object getArrayCopy(Object orig,
                           Object owner,
                           String field)
Description copied from interface: ProxyManager
Return a new array of the same component type as the given array and containing the same elements. Works for both primitive and object array types.
Specified by:
getArrayCopy in interface ProxyManager

getCustomCopy

public Object getCustomCopy(Object orig,
                            Object owner,
                            String field)
Description copied from interface: ProxyManager
Return a copy of the given object with the same information. If the given object is proxied, the returned instance will be the correct non-proxied type. This will only be invoked if ProxyManager.isCustomProxyType(java.lang.Class) returns true when invoked with orig's class.
Specified by:
getCustomCopy in interface ProxyManager

getDateProxy

public ProxyDate getDateProxy(Date date,
                              Object owner,
                              String field)
Description copied from interface: ProxyManager
Return a proxy for the given date instance. The owner of the proxy should be set to the given object and field.
Specified by:
getDateProxy in interface ProxyManager

getCollectionProxy

public ProxyCollection getCollectionProxy(Class type,
                                          Class elementType,
                                          Collection contents,
                                          Comparator compare,
                                          Object owner,
                                          String field)
Description copied from interface: ProxyManager
Return a proxy for the given collection type. The returned collection will allow only addition of elements assignable from the given element type, and can be configured to not allow the addition of null elements. The owner of the proxy should be set to the given object and field.
Specified by:
getCollectionProxy in interface ProxyManager

getMapProxy

public ProxyMap getMapProxy(Class type,
                            Class keyType,
                            Class valueType,
                            Map contents,
                            Comparator compare,
                            Object owner,
                            String field)
Description copied from interface: ProxyManager
Return a proxy for the given map type. The returned map will allow only addition of keys/values assignable from the given keyType/valueType, and can be configured to not allow the addition of null keys/elements. The owner of the proxy should be set to the given object and field.
Specified by:
getMapProxy in interface ProxyManager

getCustomProxy

public Proxy getCustomProxy(Object orig,
                            Object owner,
                            String field)
Description copied from interface: ProxyManager
Return a proxy for the given object. The owner of the proxy should be set to the given object and field. This will only be invoked if ProxyManager.isCustomProxyType(java.lang.Class) returns true when invoked with orig's class.
Specified by:
getCustomProxy in interface ProxyManager

SolarMetric Kodo JDO 2.5.8 generated on January 11 2004

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