Save This Page
Home » apache-openjpa-1.1.0-source » org.apache.openjpa » util » [javadoc | source]
org.apache.openjpa.util
public class: ProxyManagerImpl [javadoc | source]
java.lang.Object
   org.apache.openjpa.util.ProxyManagerImpl

All Implemented Interfaces:
    ProxyManager

Default implementation of the ProxyManager interface.
Constructor:
 public ProxyManagerImpl() 
Method from org.apache.openjpa.util.ProxyManagerImpl Summary:
allowsDuplicates,   copyArray,   copyCalendar,   copyCollection,   copyCustom,   copyDate,   copyMap,   findCopyConstructor,   findGetter,   generateProxyBeanBytecode,   generateProxyCalendarBytecode,   generateProxyCollectionBytecode,   generateProxyDateBytecode,   generateProxyMapBytecode,   getAssertAllowedType,   getTrackChanges,   getUnproxyable,   isOrdered,   isSetter,   isUnproxyable,   loadBuildTimeProxy,   main,   newCalendarProxy,   newCollectionProxy,   newCustomProxy,   newDateProxy,   newMapProxy,   setAssertAllowedType,   setTrackChanges,   setUnproxyable,   toProxyableCollectionType,   toProxyableMapType
Methods from java.lang.Object:
equals,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from org.apache.openjpa.util.ProxyManagerImpl Detail:
 protected boolean allowsDuplicates(Class type) 
    Return whether the given collection type allows duplicates.
 public Object copyArray(Object orig) 
 public Calendar copyCalendar(Calendar orig) 
 public Collection copyCollection(Collection orig) 
 public Object copyCustom(Object orig) 
 public Date copyDate(Date orig) 
 public Map copyMap(Map orig) 
 protected Constructor findCopyConstructor(Class cls) 
    Find an appropriate copy constructor for the given type, or return null if none.
 protected Method findGetter(Class type,
    Method setter) 
    Return the getter corresponding to the given setter, or null.
 protected BCClass generateProxyBeanBytecode(Class type,
    boolean runtime) 
    Generate the bytecode for a bean proxy for the given type.
 protected BCClass generateProxyCalendarBytecode(Class type,
    boolean runtime) 
    Generate the bytecode for a calendar proxy for the given type.
 protected BCClass generateProxyCollectionBytecode(Class type,
    boolean runtime) 
    Generate the bytecode for a collection proxy for the given type.
 protected BCClass generateProxyDateBytecode(Class type,
    boolean runtime) 
    Generate the bytecode for a date proxy for the given type.
 protected BCClass generateProxyMapBytecode(Class type,
    boolean runtime) 
    Generate the bytecode for a map proxy for the given type.
 public boolean getAssertAllowedType() 
    Whether to perform runtime checks to ensure that all elements added to collection and map proxies are the proper element/key/value type as defined by the metadata. Defaults to false.
 public boolean getTrackChanges() 
    Whether proxies produced by this factory will use ChangeTracker s to try to cut down on data store operations at the cost of some extra bookkeeping overhead. Defaults to true.
 public Collection getUnproxyable() 
    Return a mutable view of class names we know cannot be proxied correctly by this manager.
 protected boolean isOrdered(Class type) 
    Return whether the given collection type maintains an artificial ordering.
 protected boolean isSetter(Method meth) 
    Return whether the given method is a setter.
 protected boolean isUnproxyable(Class type) 
    Return whether the given type is known to be unproxyable.
 protected Class loadBuildTimeProxy(Class type,
    ClassLoader loader) 
    Load the proxy class generated at build time for the given type, returning null if none exists.
 public static  void main(String[] args) throws IOException, ClassNotFoundException 
    Usage: java org.apache.openjpa.util.proxy.ProxyManagerImpl [option]* <class name>+
    Where the following options are recognized:
    • -utils/-u <number>: Generate proxies for the standard java.util collection, map, date, and calendar classes of the given Java version. Use 4 for Java 1.4, 5 for Java 5, etc.
    The main method generates .class files for the proxies to the classes given on the command line. It writes the generated classes to beside the ProxyManagerImpl.class file if possible; otherwise it writes to the current directory. The proxy manager looks for these classes before generating its own proxies at runtime.
 public Proxy newCalendarProxy(Class type,
    TimeZone zone) 
 public Proxy newCollectionProxy(Class type,
    Class elementType,
    Comparator compare) 
 public Proxy newCustomProxy(Object orig) 
 public Proxy newDateProxy(Class type) 
 public Proxy newMapProxy(Class type,
    Class keyType,
    Class elementType,
    Comparator compare) 
 public  void setAssertAllowedType(boolean assertType) 
    Whether to perform runtime checks to ensure that all elements added to collection and map proxies are the proper element/key/value type as defined by the metadata. Defaults to false.
 public  void setTrackChanges(boolean track) 
    Whether proxies produced by this factory will use ChangeTracker s to try to cut down on data store operations at the cost of some extra bookkeeping overhead. Defaults to true.
 public  void setUnproxyable(String clsNames) 
    Provided for auto-configuration. Add the given semicolon-separated class names to the set of class names we know cannot be proxied correctly by this manager.
 protected Class toProxyableCollectionType(Class type) 
    Return the concrete type for proxying.
 protected Class toProxyableMapType(Class type) 
    Return the concrete type for proxying.