You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cayenne.apache.org by nt...@apache.org on 2018/08/01 08:34:18 UTC

[1/2] cayenne git commit: Cleanup tests

Repository: cayenne
Updated Branches:
  refs/heads/STABLE-4.0 ec2612d8f -> 62769a587


Cleanup tests


Project: http://git-wip-us.apache.org/repos/asf/cayenne/repo
Commit: http://git-wip-us.apache.org/repos/asf/cayenne/commit/525f7bfb
Tree: http://git-wip-us.apache.org/repos/asf/cayenne/tree/525f7bfb
Diff: http://git-wip-us.apache.org/repos/asf/cayenne/diff/525f7bfb

Branch: refs/heads/STABLE-4.0
Commit: 525f7bfbde17f8d67b346ad27d2d0eaff7bc74b2
Parents: ec2612d
Author: Nikita Timofeev <st...@gmail.com>
Authored: Wed Aug 1 11:04:10 2018 +0300
Committer: Nikita Timofeev <st...@gmail.com>
Committed: Wed Aug 1 11:04:10 2018 +0300

----------------------------------------------------------------------
 .../persistent/auto/_ClientMtTable1.java        | 51 ++++++--------------
 .../persistent/auto/_ClientMtTable2.java        | 20 ++------
 2 files changed, 19 insertions(+), 52 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cayenne/blob/525f7bfb/cayenne-protostuff/src/test/java/org/apache/cayenne/rop/protostuff/persistent/auto/_ClientMtTable1.java
----------------------------------------------------------------------
diff --git a/cayenne-protostuff/src/test/java/org/apache/cayenne/rop/protostuff/persistent/auto/_ClientMtTable1.java b/cayenne-protostuff/src/test/java/org/apache/cayenne/rop/protostuff/persistent/auto/_ClientMtTable1.java
index f471aa6..e7178e0 100644
--- a/cayenne-protostuff/src/test/java/org/apache/cayenne/rop/protostuff/persistent/auto/_ClientMtTable1.java
+++ b/cayenne-protostuff/src/test/java/org/apache/cayenne/rop/protostuff/persistent/auto/_ClientMtTable1.java
@@ -41,15 +41,11 @@ public abstract class _ClientMtTable1 extends PersistentObject {
 
         return dateAttribute;
     }
+
     public void setDateAttribute(LocalDate dateAttribute) {
         if(objectContext != null) {
             objectContext.prepareForAccess(this, "dateAttribute", false);
-        }
-
-        Object oldValue = this.dateAttribute;
-        // notify objectContext about simple property change
-        if(objectContext != null) {
-            objectContext.propertyChanged(this, "dateAttribute", oldValue, dateAttribute);
+            objectContext.propertyChanged(this, "dateAttribute", this.dateAttribute, dateAttribute);
         }
         
         this.dateAttribute = dateAttribute;
@@ -62,15 +58,11 @@ public abstract class _ClientMtTable1 extends PersistentObject {
 
         return globalAttribute;
     }
+
     public void setGlobalAttribute(String globalAttribute) {
         if(objectContext != null) {
             objectContext.prepareForAccess(this, "globalAttribute", false);
-        }
-
-        Object oldValue = this.globalAttribute;
-        // notify objectContext about simple property change
-        if(objectContext != null) {
-            objectContext.propertyChanged(this, "globalAttribute", oldValue, globalAttribute);
+            objectContext.propertyChanged(this, "globalAttribute", this.globalAttribute, globalAttribute);
         }
         
         this.globalAttribute = globalAttribute;
@@ -83,15 +75,11 @@ public abstract class _ClientMtTable1 extends PersistentObject {
 
         return oldDateAttribute;
     }
+
     public void setOldDateAttribute(Date oldDateAttribute) {
         if(objectContext != null) {
             objectContext.prepareForAccess(this, "oldDateAttribute", false);
-        }
-
-        Object oldValue = this.oldDateAttribute;
-        // notify objectContext about simple property change
-        if(objectContext != null) {
-            objectContext.propertyChanged(this, "oldDateAttribute", oldValue, oldDateAttribute);
+            objectContext.propertyChanged(this, "oldDateAttribute", this.oldDateAttribute, oldDateAttribute);
         }
         
         this.oldDateAttribute = oldDateAttribute;
@@ -104,15 +92,11 @@ public abstract class _ClientMtTable1 extends PersistentObject {
 
         return serverAttribute;
     }
+
     public void setServerAttribute(String serverAttribute) {
         if(objectContext != null) {
             objectContext.prepareForAccess(this, "serverAttribute", false);
-        }
-
-        Object oldValue = this.serverAttribute;
-        // notify objectContext about simple property change
-        if(objectContext != null) {
-            objectContext.propertyChanged(this, "serverAttribute", oldValue, serverAttribute);
+            objectContext.propertyChanged(this, "serverAttribute", this.serverAttribute, serverAttribute);
         }
         
         this.serverAttribute = serverAttribute;
@@ -125,15 +109,11 @@ public abstract class _ClientMtTable1 extends PersistentObject {
 
         return timeAttribute;
     }
+
     public void setTimeAttribute(LocalTime timeAttribute) {
         if(objectContext != null) {
             objectContext.prepareForAccess(this, "timeAttribute", false);
-        }
-
-        Object oldValue = this.timeAttribute;
-        // notify objectContext about simple property change
-        if(objectContext != null) {
-            objectContext.propertyChanged(this, "timeAttribute", oldValue, timeAttribute);
+            objectContext.propertyChanged(this, "timeAttribute", this.timeAttribute, timeAttribute);
         }
         
         this.timeAttribute = timeAttribute;
@@ -146,15 +126,11 @@ public abstract class _ClientMtTable1 extends PersistentObject {
 
         return timestampAttribute;
     }
+
     public void setTimestampAttribute(LocalDateTime timestampAttribute) {
         if(objectContext != null) {
             objectContext.prepareForAccess(this, "timestampAttribute", false);
-        }
-
-        Object oldValue = this.timestampAttribute;
-        // notify objectContext about simple property change
-        if(objectContext != null) {
-            objectContext.propertyChanged(this, "timestampAttribute", oldValue, timestampAttribute);
+            objectContext.propertyChanged(this, "timestampAttribute", this.timestampAttribute, timestampAttribute);
         }
         
         this.timestampAttribute = timestampAttribute;
@@ -169,6 +145,7 @@ public abstract class _ClientMtTable1 extends PersistentObject {
 
         return table2Array;
     }
+
     public void addToTable2Array(ClientMtTable2 object) {
         if(objectContext != null) {
             objectContext.prepareForAccess(this, "table2Array", true);
@@ -178,6 +155,7 @@ public abstract class _ClientMtTable1 extends PersistentObject {
 
         this.table2Array.add(object);
     }
+
     public void removeFromTable2Array(ClientMtTable2 object) {
         if(objectContext != null) {
             objectContext.prepareForAccess(this, "table2Array", true);
@@ -187,5 +165,4 @@ public abstract class _ClientMtTable1 extends PersistentObject {
 
         this.table2Array.remove(object);
     }
-
 }

http://git-wip-us.apache.org/repos/asf/cayenne/blob/525f7bfb/cayenne-protostuff/src/test/java/org/apache/cayenne/rop/protostuff/persistent/auto/_ClientMtTable2.java
----------------------------------------------------------------------
diff --git a/cayenne-protostuff/src/test/java/org/apache/cayenne/rop/protostuff/persistent/auto/_ClientMtTable2.java b/cayenne-protostuff/src/test/java/org/apache/cayenne/rop/protostuff/persistent/auto/_ClientMtTable2.java
index 598fcdf..a6c8c37 100644
--- a/cayenne-protostuff/src/test/java/org/apache/cayenne/rop/protostuff/persistent/auto/_ClientMtTable2.java
+++ b/cayenne-protostuff/src/test/java/org/apache/cayenne/rop/protostuff/persistent/auto/_ClientMtTable2.java
@@ -14,7 +14,7 @@ import org.apache.cayenne.util.PersistentObjectHolder;
 public abstract class _ClientMtTable2 extends PersistentObject {
 
     public static final Property<String> GLOBAL_ATTRIBUTE = Property.create("globalAttribute", String.class);
-    public static final Property<org.apache.cayenne.rop.protostuff.persistent.MtTable1> TABLE1 = Property.create("table1", org.apache.cayenne.rop.protostuff.persistent.MtTable1.class);
+    public static final Property<ClientMtTable1> TABLE1 = Property.create("table1", ClientMtTable1.class);
 
     protected String globalAttribute;
     protected ValueHolder table1;
@@ -26,15 +26,11 @@ public abstract class _ClientMtTable2 extends PersistentObject {
 
         return globalAttribute;
     }
+
     public void setGlobalAttribute(String globalAttribute) {
         if(objectContext != null) {
             objectContext.prepareForAccess(this, "globalAttribute", false);
-        }
-
-        Object oldValue = this.globalAttribute;
-        // notify objectContext about simple property change
-        if(objectContext != null) {
-            objectContext.propertyChanged(this, "globalAttribute", oldValue, globalAttribute);
+            objectContext.propertyChanged(this, "globalAttribute", this.globalAttribute, globalAttribute);
         }
         
         this.globalAttribute = globalAttribute;
@@ -49,21 +45,15 @@ public abstract class _ClientMtTable2 extends PersistentObject {
 
         return (ClientMtTable1) table1.getValue();
     }
+
     public void setTable1(ClientMtTable1 table1) {
         if(objectContext != null) {
             objectContext.prepareForAccess(this, "table1", true);
+            objectContext.propertyChanged(this, "table1", this.table1.getValueDirectly(), table1);
         } else if (this.table1 == null) {
         	this.table1 = new PersistentObjectHolder(this, "table1");
 		}
-
-        // note how we notify ObjectContext of change BEFORE the object is actually
-        // changed... this is needed to take a valid current snapshot
-        Object oldValue = this.table1.getValueDirectly();
-        if (objectContext != null) {
-        	objectContext.propertyChanged(this, "table1", oldValue, table1);
-        }
         
         this.table1.setValue(table1);
     }
-
 }


[2/2] cayenne git commit: Prepare for 4.0 release

Posted by nt...@apache.org.
Prepare for 4.0 release


Project: http://git-wip-us.apache.org/repos/asf/cayenne/repo
Commit: http://git-wip-us.apache.org/repos/asf/cayenne/commit/62769a58
Tree: http://git-wip-us.apache.org/repos/asf/cayenne/tree/62769a58
Diff: http://git-wip-us.apache.org/repos/asf/cayenne/diff/62769a58

Branch: refs/heads/STABLE-4.0
Commit: 62769a5871c9f399bf396dfa4b47658323238b1c
Parents: 525f7bf
Author: Nikita Timofeev <st...@gmail.com>
Authored: Wed Aug 1 11:34:05 2018 +0300
Committer: Nikita Timofeev <st...@gmail.com>
Committed: Wed Aug 1 11:34:05 2018 +0300

----------------------------------------------------------------------
 RELEASE-NOTES.txt | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cayenne/blob/62769a58/RELEASE-NOTES.txt
----------------------------------------------------------------------
diff --git a/RELEASE-NOTES.txt b/RELEASE-NOTES.txt
index a8faffd..98df979 100644
--- a/RELEASE-NOTES.txt
+++ b/RELEASE-NOTES.txt
@@ -8,8 +8,8 @@ To browse individual bug reports check out project issue tracker:
 https://issues.apache.org/jira/browse/CAY
 
 ----------------------------------
-Release: 4.0.RC2
-Date:
+Release: 4.0
+Date: August 01, 2018
 ----------------------------------
 
 Bug Fixes:
@@ -17,6 +17,7 @@ Bug Fixes:
 CAY-2418 Modeler: unable to edit entity selected via Search
 CAY-2427 Modeler: Undo throws exception
 CAY-2430 Modeler: Redo throws NPE
+CAY-2431 Cayenne JDK 11 compatibility
 CAY-2435 cdbimport: procedure parameters are not imported
 CAY-2436 NPE in CayenneRuntimeException constructor
 CAY-2442 Broken EventBridge providers implementations