db-ojb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From arm...@apache.org
Subject cvs commit: db-ojb/src/java/org/apache/ojb/broker/accesslayer StatementManager.java
Date Fri, 13 Jun 2003 23:06:45 GMT
arminw      2003/06/13 16:06:45

  Modified:    src/java/org/apache/ojb/broker/util ProxyHelper.java
               src/java/org/apache/ojb/broker/core
                        PersistenceBrokerImpl.java
               src/java/org/apache/ojb/broker/accesslayer
                        StatementManager.java
  Log:
  replace Identity.getObjectsTopLevelClass
  with Identity.getObjectsRealClass
  
  Revision  Changes    Path
  1.14      +13 -3     db-ojb/src/java/org/apache/ojb/broker/util/ProxyHelper.java
  
  Index: ProxyHelper.java
  ===================================================================
  RCS file: /home/cvs/db-ojb/src/java/org/apache/ojb/broker/util/ProxyHelper.java,v
  retrieving revision 1.13
  retrieving revision 1.14
  diff -u -r1.13 -r1.14
  --- ProxyHelper.java	12 Jun 2003 16:49:16 -0000	1.13
  +++ ProxyHelper.java	13 Jun 2003 23:06:45 -0000	1.14
  @@ -264,7 +264,12 @@
               try
               {
                   handler = (IndirectionHandler) Proxy.getInvocationHandler(objectOrProxy);
  -                return handler.getIdentity().getObjectsTopLevelClass();
  +                /*
  +                arminw:
  +                think we should return the real class
  +                */
  +                // return handler.getIdentity().getObjectsTopLevelClass();
  +                return handler.getIdentity().getObjectsRealClass();
               }
               catch (IllegalArgumentException e)
               {
  @@ -275,7 +280,12 @@
           else if (objectOrProxy instanceof VirtualProxy)
           {
               handler = (IndirectionHandler) VirtualProxy.getIndirectionHandler((VirtualProxy)
objectOrProxy);
  -            return handler.getIdentity().getObjectsTopLevelClass();
  +            /*
  +            arminw:
  +            think we should return the real class
  +            */
  +            // return handler.getIdentity().getObjectsTopLevelClass();
  +            return handler.getIdentity().getObjectsRealClass();
           }
           else
           {
  
  
  
  1.11      +2 -8      db-ojb/src/java/org/apache/ojb/broker/core/PersistenceBrokerImpl.java
  
  Index: PersistenceBrokerImpl.java
  ===================================================================
  RCS file: /home/cvs/db-ojb/src/java/org/apache/ojb/broker/core/PersistenceBrokerImpl.java,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- PersistenceBrokerImpl.java	12 Jun 2003 16:49:15 -0000	1.10
  +++ PersistenceBrokerImpl.java	13 Jun 2003 23:06:45 -0000	1.11
  @@ -1154,7 +1154,7 @@
   	private Query getPKQuery(Identity oid)
   	{
           Object[] values = oid.getPrimaryKeyValues();
  -        ClassDescriptor cld = getClassDescriptor(oid.getObjectsTopLevelClass());
  +        ClassDescriptor cld = getClassDescriptor(oid.getObjectsRealClass());
           FieldDescriptor[] fields = cld.getPkFields();
           Criteria criteria = new Criteria();
   
  @@ -1513,12 +1513,6 @@
       private Object getDBObject(Identity oid) throws ClassNotPersistenceCapableException
       {
           Class c = oid.getObjectsRealClass();
  -
  -        if (c == null)
  -        {
  -            c = oid.getObjectsTopLevelClass();
  -        }
  -
           ClassDescriptor cld = descriptorRepository.getDescriptorFor(c);
           Object newObj = null;
   
  
  
  
  1.37      +3 -3      db-ojb/src/java/org/apache/ojb/broker/accesslayer/StatementManager.java
  
  Index: StatementManager.java
  ===================================================================
  RCS file: /home/cvs/db-ojb/src/java/org/apache/ojb/broker/accesslayer/StatementManager.java,v
  retrieving revision 1.36
  retrieving revision 1.37
  diff -u -r1.36 -r1.37
  --- StatementManager.java	12 Jun 2003 16:49:15 -0000	1.36
  +++ StatementManager.java	13 Jun 2003 23:06:45 -0000	1.37
  @@ -184,7 +184,7 @@
   
   		if (cld == null)
   		{
  -			cld = m_broker.getClassDescriptor(oid.getObjectsTopLevelClass());
  +			cld = m_broker.getClassDescriptor(oid.getObjectsRealClass());
   		}
   
   		values = getKeyValues(m_broker, cld, oid);
  @@ -509,7 +509,7 @@
   
   		if (cld == null)
   		{
  -			cld = m_broker.getClassDescriptor(oid.getObjectsTopLevelClass());
  +			cld = m_broker.getClassDescriptor(oid.getObjectsRealClass());
   		}
   		try
   		{
  
  
  

Mime
View raw message