/** * PUBLIC: * Set this mapping to use Proxy Indirection. * * Proxy Indirection uses the <CODE>Proxy</CODE> and <CODE>InvocationHandler</CODE> features * of JDK 1.3 to provide "transparent indirection" for 1:1 relationships. In order to use Proxy * Indirection: * * <UL> * <LI>The target class must implement at least one public interface * <LI>The attribute on the source class must be typed as that public interface * <LI>get() and set() methods for the attribute must use the interface * </UL> * * With this policy, proxy objects are returned during object creation. When a message other than * <CODE>toString</CODE> is called on the proxy the real object data is retrieved from the database. * * @param targetInterfaces The interfaces that the target class implements. The attribute must be typed * as one of these interfaces. */ public void useProxyIndirection(Class[] targetInterfaces) { setIndirectionPolicy(new ProxyIndirectionPolicy(targetInterfaces)); }
/** * PUBLIC: * Set this mapping to use Proxy Indirection. * * Proxy Indirection uses the <CODE>Proxy</CODE> and <CODE>InvocationHandler</CODE> features * of JDK 1.3 to provide "transparent indirection" for 1:1 relationships. In order to use Proxy * Indirection:<P> * * <UL> * <LI>The target class must implement at least one public interface * <LI>The attribute on the source class must be typed as that public interface * <LI>get() and set() methods for the attribute must use the interface * </UL> * * With this policy, proxy objects are returned during object creation. When a message other than * <CODE>toString</CODE> is called on the proxy the real object data is retrieved from the database. * * @param proxyInterfaces The interfaces that the target class implements. The attribute must be typed * as one of these interfaces. */ public void useProxyIndirection(Class[] targetInterfaces) { setIndirectionPolicy(new ProxyIndirectionPolicy(targetInterfaces)); }
/** * PUBLIC: * Set this mapping to use Proxy Indirection. * * Proxy Indirection uses the <CODE>Proxy</CODE> and <CODE>InvocationHandler</CODE> features * of JDK 1.3 to provide "transparent indirection" for 1:1 relationships. In order to use Proxy * Indirection: * * <UL> * <LI>The target class must implement at least one public interface * <LI>The attribute on the source class must be typed as that public interface * <LI>get() and set() methods for the attribute must use the interface * </UL> * * With this policy, proxy objects are returned during object creation. When a message other than * <CODE>toString</CODE> is called on the proxy the real object data is retrieved from the database. * * @param targetInterface The interface that the target class implements. The attribute must be typed * as this interface. */ public void useProxyIndirection(Class targetInterface) { Class[] targetInterfaces = new Class[] { targetInterface }; setIndirectionPolicy(new ProxyIndirectionPolicy(targetInterfaces)); }
/** * PUBLIC: * Set this mapping to use Proxy Indirection. * * Proxy Indirection uses the <CODE>Proxy</CODE> and <CODE>InvocationHandler</CODE> features * of JDK 1.3 to provide "transparent indirection" for 1:1 relationships. In order to use Proxy * Indirection: * * <UL> * <LI>The target class must implement at least one public interface * <LI>The attribute on the source class must be typed as that public interface * <LI>get() and set() methods for the attribute must use the interface * </UL> * * With this policy, proxy objects are returned during object creation. When a message other than * <CODE>toString</CODE> is called on the proxy the real object data is retrieved from the database. * * @param targetInterfaces The interfaces that the target class implements. The attribute must be typed * as one of these interfaces. */ public void useProxyIndirection(Class[] targetInterfaces) { setIndirectionPolicy(new ProxyIndirectionPolicy(targetInterfaces)); }
/** * PUBLIC: * Set this mapping to use Proxy Indirection. * * Proxy Indirection uses the <CODE>Proxy</CODE> and <CODE>InvocationHandler</CODE> features * of JDK 1.3 to provide "transparent indirection" for 1:1 relationships. In order to use Proxy * Indirection: * * <UL> * <LI>The target class must implement at least one public interface * <LI>The attribute on the source class must be typed as that public interface * <LI>get() and set() methods for the attribute must use the interface * </UL> * * With this policy, proxy objects are returned during object creation. When a message other than * <CODE>toString</CODE> is called on the proxy the real object data is retrieved from the database. * * @param targetInterface The interface that the target class implements. The attribute must be typed * as this interface. */ public void useProxyIndirection(Class targetInterface) { Class[] targetInterfaces = new Class[] { targetInterface }; setIndirectionPolicy(new ProxyIndirectionPolicy(targetInterfaces)); }
/** * PUBLIC: * Set this mapping to use Proxy Indirection. * * Proxy Indirection uses the <CODE>Proxy</CODE> and <CODE>InvocationHandler</CODE> features * of JDK 1.3 to provide "transparent indirection" for 1:1 relationships. In order to use Proxy * Indirection:<P> * * <UL> * <LI>The target class must implement at least one public interface * <LI>The attribute on the source class must be typed as that public interface * <LI>get() and set() methods for the attribute must use the interface * </UL> * * With this policy, proxy objects are returned during object creation. When a message other than * <CODE>toString</CODE> is called on the proxy the real object data is retrieved from the database. * * @param proxyInterface The interface that the target class implements. The attribute must be typed * as this interface. */ public void useProxyIndirection(Class targetInterface) { Class[] targetInterfaces = new Class[] { targetInterface }; setIndirectionPolicy(new ProxyIndirectionPolicy(targetInterfaces)); }
Class[] targetInterfaces = getReferenceClass().getInterfaces(); if (!getReferenceClass().isInterface() && getReferenceClass().getSuperclass() == null) { setIndirectionPolicy(new ProxyIndirectionPolicy(targetInterfaces)); } else { HashSet targetInterfacesCol = new HashSet(); setIndirectionPolicy(new ProxyIndirectionPolicy(targetInterfaces));
Class[] targetInterfaces = getReferenceClass().getInterfaces(); if (!getReferenceClass().isInterface() && getReferenceClass().getSuperclass() == null) { setIndirectionPolicy(new ProxyIndirectionPolicy(targetInterfaces)); } else { HashSet targetInterfacesCol = new HashSet(); setIndirectionPolicy(new ProxyIndirectionPolicy(targetInterfaces));
Class[] targetInterfaces = getReferenceClass().getInterfaces(); if (!getReferenceClass().isInterface() && getReferenceClass().getSuperclass() == null) { setIndirectionPolicy(new ProxyIndirectionPolicy(targetInterfaces)); } else { HashSet targetInterfacesCol = new HashSet(); setIndirectionPolicy(new ProxyIndirectionPolicy(targetInterfaces));