cayenne-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aadamc...@apache.org
Subject svn commit: r479218 - /incubator/cayenne/main/trunk/core/cayenne-jdk1.4/src/main/java/org/apache/cayenne/reflect/pojo/EnhancedPojoToManyProperty.java
Date Sat, 25 Nov 2006 22:34:08 GMT
Author: aadamchik
Date: Sat Nov 25 14:34:07 2006
New Revision: 479218

URL: http://svn.apache.org/viewvc?view=rev&rev=479218
Log:
CAY-682: Generic Cayenne POJO enhancer
(adding proper faulting behavior for to-many)

Modified:
    incubator/cayenne/main/trunk/core/cayenne-jdk1.4/src/main/java/org/apache/cayenne/reflect/pojo/EnhancedPojoToManyProperty.java

Modified: incubator/cayenne/main/trunk/core/cayenne-jdk1.4/src/main/java/org/apache/cayenne/reflect/pojo/EnhancedPojoToManyProperty.java
URL: http://svn.apache.org/viewvc/incubator/cayenne/main/trunk/core/cayenne-jdk1.4/src/main/java/org/apache/cayenne/reflect/pojo/EnhancedPojoToManyProperty.java?view=diff&rev=479218&r1=479217&r2=479218
==============================================================================
--- incubator/cayenne/main/trunk/core/cayenne-jdk1.4/src/main/java/org/apache/cayenne/reflect/pojo/EnhancedPojoToManyProperty.java
(original)
+++ incubator/cayenne/main/trunk/core/cayenne-jdk1.4/src/main/java/org/apache/cayenne/reflect/pojo/EnhancedPojoToManyProperty.java
Sat Nov 25 14:34:07 2006
@@ -18,9 +18,11 @@
  ****************************************************************/
 package org.apache.cayenne.reflect.pojo;
 
+import org.apache.cayenne.ValueHolder;
 import org.apache.cayenne.reflect.Accessor;
 import org.apache.cayenne.reflect.ClassDescriptor;
 import org.apache.cayenne.reflect.ListProperty;
+import org.apache.cayenne.reflect.PropertyException;
 
 /**
  * @since 3.0
@@ -36,6 +38,12 @@
         this.faultHandler = new EnhancedPojoPropertyFaultHandler(
                 owner.getObjectClass(),
                 getName());
+    }
+    
+    protected ValueHolder createCollectionValueHolder(Object object) throws PropertyException
{
+        ValueHolder holder = super.createCollectionValueHolder(object);
+        faultHandler.setFaultProperty(object, false);
+        return holder;
     }
 
     public void invalidate(Object object) {



Mime
View raw message