cayenne-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aadamc...@apache.org
Subject svn commit: r479173 - in /incubator/cayenne/main/trunk/core/cayenne-jdk1.4/src/main/java/org/apache/cayenne/reflect: generic/ pojo/ valueholder/
Date Sat, 25 Nov 2006 19:07:27 GMT
Author: aadamchik
Date: Sat Nov 25 11:07:26 2006
New Revision: 479173

URL: http://svn.apache.org/viewvc?view=rev&rev=479173
Log:
CAY-701: "property" package refactoring
(creating subpackages in refelect package to organize descriptors by the object type)

Modified:
    incubator/cayenne/main/trunk/core/cayenne-jdk1.4/src/main/java/org/apache/cayenne/reflect/generic/DataObjectAccessor.java
    incubator/cayenne/main/trunk/core/cayenne-jdk1.4/src/main/java/org/apache/cayenne/reflect/generic/DataObjectToManyProperty.java
    incubator/cayenne/main/trunk/core/cayenne-jdk1.4/src/main/java/org/apache/cayenne/reflect/pojo/EnhancedPojoToManyProperty.java
    incubator/cayenne/main/trunk/core/cayenne-jdk1.4/src/main/java/org/apache/cayenne/reflect/pojo/EnhancedPojoToOneProperty.java
    incubator/cayenne/main/trunk/core/cayenne-jdk1.4/src/main/java/org/apache/cayenne/reflect/valueholder/ValueHolderProperty.java

Modified: incubator/cayenne/main/trunk/core/cayenne-jdk1.4/src/main/java/org/apache/cayenne/reflect/generic/DataObjectAccessor.java
URL: http://svn.apache.org/viewvc/incubator/cayenne/main/trunk/core/cayenne-jdk1.4/src/main/java/org/apache/cayenne/reflect/generic/DataObjectAccessor.java?view=diff&rev=479173&r1=479172&r2=479173
==============================================================================
--- incubator/cayenne/main/trunk/core/cayenne-jdk1.4/src/main/java/org/apache/cayenne/reflect/generic/DataObjectAccessor.java
(original)
+++ incubator/cayenne/main/trunk/core/cayenne-jdk1.4/src/main/java/org/apache/cayenne/reflect/generic/DataObjectAccessor.java
Sat Nov 25 11:07:26 2006
@@ -26,13 +26,14 @@
 /**
  * A PropertyAccessor that uses DataObject API to read/write values.
  * 
+ * @since 3.0
  * @author Andrus Adamchik
  */
-public class DataObjectAccessor implements Accessor {
+class DataObjectAccessor implements Accessor {
 
     protected String propertyName;
 
-    public DataObjectAccessor(String propertyName) {
+    DataObjectAccessor(String propertyName) {
 
         if (propertyName == null) {
             throw new IllegalArgumentException("Null propertyName");

Modified: incubator/cayenne/main/trunk/core/cayenne-jdk1.4/src/main/java/org/apache/cayenne/reflect/generic/DataObjectToManyProperty.java
URL: http://svn.apache.org/viewvc/incubator/cayenne/main/trunk/core/cayenne-jdk1.4/src/main/java/org/apache/cayenne/reflect/generic/DataObjectToManyProperty.java?view=diff&rev=479173&r1=479172&r2=479173
==============================================================================
--- incubator/cayenne/main/trunk/core/cayenne-jdk1.4/src/main/java/org/apache/cayenne/reflect/generic/DataObjectToManyProperty.java
(original)
+++ incubator/cayenne/main/trunk/core/cayenne-jdk1.4/src/main/java/org/apache/cayenne/reflect/generic/DataObjectToManyProperty.java
Sat Nov 25 11:07:26 2006
@@ -31,12 +31,12 @@
  * A list property that is intended to work with
  * {@link org.apache.cayenne.access.ToManyList}.
  * 
- * @since 1.2
+ * @since 3.0
  * @author Andrus Adamchik
  */
-public class DataObjectToManyProperty extends ListProperty {
+class DataObjectToManyProperty extends ListProperty {
 
-    public DataObjectToManyProperty(ClassDescriptor owner, ClassDescriptor targetDescriptor,
+    DataObjectToManyProperty(ClassDescriptor owner, ClassDescriptor targetDescriptor,
             Accessor accessor, String reverseName) {
         super(owner, targetDescriptor, accessor, reverseName);
     }
@@ -55,7 +55,7 @@
                 (Persistent) object,
                 getName());
     }
-    
+
     public void invalidate(Object object) {
         writePropertyDirectly(object, null, Fault.getToManyFault());
     }

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=479173&r1=479172&r2=479173
==============================================================================
--- 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 11:07:26 2006
@@ -26,13 +26,12 @@
  * @since 3.0
  * @author Andrus Adamchik
  */
-public class EnhancedPojoToManyProperty extends ListProperty {
+class EnhancedPojoToManyProperty extends ListProperty {
 
     private Accessor faultResolvedFlagAccessor;
 
-    public EnhancedPojoToManyProperty(ClassDescriptor owner,
-            ClassDescriptor targetDescriptor, Accessor accessor, String reverseName,
-            Accessor faultResolvedFlagAccessor) {
+    EnhancedPojoToManyProperty(ClassDescriptor owner, ClassDescriptor targetDescriptor,
+            Accessor accessor, String reverseName, Accessor faultResolvedFlagAccessor) {
         super(owner, targetDescriptor, accessor, reverseName);
         this.faultResolvedFlagAccessor = faultResolvedFlagAccessor;
     }
@@ -40,5 +39,4 @@
     public void invalidate(Object object) {
         faultResolvedFlagAccessor.setValue(object, Boolean.FALSE);
     }
-
 }

Modified: incubator/cayenne/main/trunk/core/cayenne-jdk1.4/src/main/java/org/apache/cayenne/reflect/pojo/EnhancedPojoToOneProperty.java
URL: http://svn.apache.org/viewvc/incubator/cayenne/main/trunk/core/cayenne-jdk1.4/src/main/java/org/apache/cayenne/reflect/pojo/EnhancedPojoToOneProperty.java?view=diff&rev=479173&r1=479172&r2=479173
==============================================================================
--- incubator/cayenne/main/trunk/core/cayenne-jdk1.4/src/main/java/org/apache/cayenne/reflect/pojo/EnhancedPojoToOneProperty.java
(original)
+++ incubator/cayenne/main/trunk/core/cayenne-jdk1.4/src/main/java/org/apache/cayenne/reflect/pojo/EnhancedPojoToOneProperty.java
Sat Nov 25 11:07:26 2006
@@ -33,13 +33,12 @@
  * @since 3.0
  * @author Andrus Adamchik
  */
-public class EnhancedPojoToOneProperty extends BaseToOneProperty {
+class EnhancedPojoToOneProperty extends BaseToOneProperty {
 
     protected Accessor faultResolvedFlagAccessor;
 
-    public EnhancedPojoToOneProperty(ClassDescriptor owner,
-            ClassDescriptor targetDescriptor, Accessor accessor, String reverseName,
-            Accessor faultResolvedFlagAccessor) {
+    EnhancedPojoToOneProperty(ClassDescriptor owner, ClassDescriptor targetDescriptor,
+            Accessor accessor, String reverseName, Accessor faultResolvedFlagAccessor) {
         super(owner, targetDescriptor, accessor, reverseName);
         this.faultResolvedFlagAccessor = faultResolvedFlagAccessor;
     }
@@ -52,7 +51,7 @@
         faultResolvedFlagAccessor.setValue(object, Boolean.FALSE);
     }
 
-    protected void resolveFault(Object object) {
+    void resolveFault(Object object) {
         if (isFault(object)) {
             Object target = Fault.getToOneFault().resolveFault(
                     (Persistent) object,

Modified: incubator/cayenne/main/trunk/core/cayenne-jdk1.4/src/main/java/org/apache/cayenne/reflect/valueholder/ValueHolderProperty.java
URL: http://svn.apache.org/viewvc/incubator/cayenne/main/trunk/core/cayenne-jdk1.4/src/main/java/org/apache/cayenne/reflect/valueholder/ValueHolderProperty.java?view=diff&rev=479173&r1=479172&r2=479173
==============================================================================
--- incubator/cayenne/main/trunk/core/cayenne-jdk1.4/src/main/java/org/apache/cayenne/reflect/valueholder/ValueHolderProperty.java
(original)
+++ incubator/cayenne/main/trunk/core/cayenne-jdk1.4/src/main/java/org/apache/cayenne/reflect/valueholder/ValueHolderProperty.java
Sat Nov 25 11:07:26 2006
@@ -28,16 +28,16 @@
 import org.apache.cayenne.util.PersistentObjectHolder;
 
 /**
- * Provides access to a property implemented as a ValueHolder Field. This implementation
- * hides the fact of the ValueHolder existence. I.e. it never returns it from
- * 'readPropertyDirectly', returning held value instead.
+ * Provides access to a property implemented as a {@link ValueHolder} Field. This
+ * implementation hides the fact of the ValueHolder existence. I.e. it never returns it
+ * from 'readPropertyDirectly', returning held value instead.
  * 
- * @since 1.2
+ * @since 3.0
  * @author Andrus Adamchik
  */
-public class ValueHolderProperty extends BaseToOneProperty {
+class ValueHolderProperty extends BaseToOneProperty {
 
-    public ValueHolderProperty(ClassDescriptor owner, ClassDescriptor targetDescriptor,
+    ValueHolderProperty(ClassDescriptor owner, ClassDescriptor targetDescriptor,
             Accessor accessor, String reverseName) {
         super(owner, targetDescriptor, accessor, reverseName);
     }
@@ -97,8 +97,7 @@
      * Checks that an object's ValueHolder field described by this property is set,
      * injecting a ValueHolder if needed.
      */
-    protected ValueHolder ensureValueHolderSet(Object object)
-            throws PropertyException {
+    protected ValueHolder ensureValueHolderSet(Object object) throws PropertyException {
 
         ValueHolder holder = (ValueHolder) accessor.getValue(object);
         if (holder == null) {



Mime
View raw message