db-ojb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From arm...@apache.org
Subject svn commit: r518400 - in /db/ojb/branches/OJB_1_0_RELEASE/src/java/org/apache/ojb/broker: accesslayer/JdbcAccessImpl.java core/IdentityFactoryImpl.java util/BrokerHelper.java
Date Thu, 15 Mar 2007 00:54:53 GMT
Author: arminw
Date: Wed Mar 14 17:54:52 2007
New Revision: 518400

URL: http://svn.apache.org/viewvc?view=rev&rev=518400
Log:
use new convenience method to check for 'null' fields

Modified:
    db/ojb/branches/OJB_1_0_RELEASE/src/java/org/apache/ojb/broker/accesslayer/JdbcAccessImpl.java
    db/ojb/branches/OJB_1_0_RELEASE/src/java/org/apache/ojb/broker/core/IdentityFactoryImpl.java
    db/ojb/branches/OJB_1_0_RELEASE/src/java/org/apache/ojb/broker/util/BrokerHelper.java

Modified: db/ojb/branches/OJB_1_0_RELEASE/src/java/org/apache/ojb/broker/accesslayer/JdbcAccessImpl.java
URL: http://svn.apache.org/viewvc/db/ojb/branches/OJB_1_0_RELEASE/src/java/org/apache/ojb/broker/accesslayer/JdbcAccessImpl.java?view=diff&rev=518400&r1=518399&r2=518400
==============================================================================
--- db/ojb/branches/OJB_1_0_RELEASE/src/java/org/apache/ojb/broker/accesslayer/JdbcAccessImpl.java
(original)
+++ db/ojb/branches/OJB_1_0_RELEASE/src/java/org/apache/ojb/broker/accesslayer/JdbcAccessImpl.java
Wed Mar 14 17:54:52 2007
@@ -808,8 +808,7 @@
             field = fields[i];
             if(!field.isAccessReadOnly())
             {
-                Object value = field.getPersistentField().get(target);
-                if(broker.serviceBrokerHelper().representsNull(field, value))
+                if(field.representsNullAssociatedValue(target))
                 {
                     Object id = broker.serviceSequenceManager().getUniqueValue(field);
                     field.getPersistentField().set(target, id);

Modified: db/ojb/branches/OJB_1_0_RELEASE/src/java/org/apache/ojb/broker/core/IdentityFactoryImpl.java
URL: http://svn.apache.org/viewvc/db/ojb/branches/OJB_1_0_RELEASE/src/java/org/apache/ojb/broker/core/IdentityFactoryImpl.java?view=diff&rev=518400&r1=518399&r2=518400
==============================================================================
--- db/ojb/branches/OJB_1_0_RELEASE/src/java/org/apache/ojb/broker/core/IdentityFactoryImpl.java
(original)
+++ db/ojb/branches/OJB_1_0_RELEASE/src/java/org/apache/ojb/broker/core/IdentityFactoryImpl.java
Wed Mar 14 17:54:52 2007
@@ -113,7 +113,7 @@
                     we check all PK fields for 'null'-values
                     */
                     Object value = fld.getPersistentField().get(objOrProxy);
-                    if(helper.representsNull(fld, value))
+                    if(fld.representsNull(value))
                     {
                         result = (Identity) transientIdentityMap.get(objOrProxy);
                         if(result == null)

Modified: db/ojb/branches/OJB_1_0_RELEASE/src/java/org/apache/ojb/broker/util/BrokerHelper.java
URL: http://svn.apache.org/viewvc/db/ojb/branches/OJB_1_0_RELEASE/src/java/org/apache/ojb/broker/util/BrokerHelper.java?view=diff&rev=518400&r1=518399&r2=518400
==============================================================================
--- db/ojb/branches/OJB_1_0_RELEASE/src/java/org/apache/ojb/broker/util/BrokerHelper.java
(original)
+++ db/ojb/branches/OJB_1_0_RELEASE/src/java/org/apache/ojb/broker/util/BrokerHelper.java
Wed Mar 14 17:54:52 2007
@@ -333,7 +333,7 @@
      */
     public boolean representsNull(FieldDescriptor fld, Object aValue)
     {
-    	return fld.getNullCheck().representsNull(fld, aValue);
+    	return fld.representsNull(aValue);
     }
 
     /**



---------------------------------------------------------------------
To unsubscribe, e-mail: ojb-dev-unsubscribe@db.apache.org
For additional commands, e-mail: ojb-dev-help@db.apache.org


Mime
View raw message