db-ojb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From b..@apache.org
Subject cvs commit: jakarta-ojb/src/java/org/apache/ojb/broker/metadata/fieldaccess PersistentFieldDefaultImpl.java PersistentFieldMaxPerformanceImpl.java
Date Fri, 06 Dec 2002 16:25:39 GMT
brj         2002/12/06 08:25:39

  Modified:    src/java/org/apache/ojb/broker/metadata/fieldaccess
                        PersistentFieldDefaultImpl.java
                        PersistentFieldMaxPerformanceImpl.java
  Log:
  added support for VirtualProxy
  
  Revision  Changes    Path
  1.9       +7 -1      jakarta-ojb/src/java/org/apache/ojb/broker/metadata/fieldaccess/PersistentFieldDefaultImpl.java
  
  Index: PersistentFieldDefaultImpl.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ojb/src/java/org/apache/ojb/broker/metadata/fieldaccess/PersistentFieldDefaultImpl.java,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- PersistentFieldDefaultImpl.java	29 Nov 2002 19:42:46 -0000	1.8
  +++ PersistentFieldDefaultImpl.java	6 Dec 2002 16:25:39 -0000	1.9
  @@ -60,6 +60,7 @@
   import java.security.AccessController;
   import java.security.PrivilegedAction;
   
  +import org.apache.ojb.broker.VirtualProxy;
   import org.apache.ojb.broker.accesslayer.IndirectionHandler;
   import org.apache.ojb.broker.metadata.MetadataException;
   import org.apache.ojb.broker.util.logging.Logger;
  @@ -212,6 +213,11 @@
           if (objectOrProxy instanceof Proxy)
           {
               handler = (IndirectionHandler) Proxy.getInvocationHandler(objectOrProxy);
  +            return handler.getRealSubject();
  +        }
  +        else if (objectOrProxy instanceof VirtualProxy)
  +        {
  +            handler = (IndirectionHandler) VirtualProxy.getIndirectionHandler((VirtualProxy)objectOrProxy);
               return handler.getRealSubject();
           }
           else
  
  
  
  1.8       +7 -1      jakarta-ojb/src/java/org/apache/ojb/broker/metadata/fieldaccess/PersistentFieldMaxPerformanceImpl.java
  
  Index: PersistentFieldMaxPerformanceImpl.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ojb/src/java/org/apache/ojb/broker/metadata/fieldaccess/PersistentFieldMaxPerformanceImpl.java,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- PersistentFieldMaxPerformanceImpl.java	29 Nov 2002 19:42:46 -0000	1.7
  +++ PersistentFieldMaxPerformanceImpl.java	6 Dec 2002 16:25:39 -0000	1.8
  @@ -57,6 +57,7 @@
   import java.lang.reflect.Field;
   import java.lang.reflect.Proxy;
   
  +import org.apache.ojb.broker.VirtualProxy;
   import org.apache.ojb.broker.accesslayer.IndirectionHandler;
   import org.apache.ojb.broker.metadata.MetadataException;
   import org.apache.ojb.broker.util.logging.Logger;
  @@ -181,6 +182,11 @@
           if (objectOrProxy instanceof Proxy)
           {
               handler = (IndirectionHandler) Proxy.getInvocationHandler(objectOrProxy);
  +            return handler.getRealSubject();
  +        }
  +        else if (objectOrProxy instanceof VirtualProxy)
  +        {
  +            handler = (IndirectionHandler) VirtualProxy.getIndirectionHandler((VirtualProxy)objectOrProxy);
               return handler.getRealSubject();
           }
           else
  
  
  

Mime
View raw message