cayenne-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aadamc...@apache.org
Subject [4/5] cayenne git commit: rerunning cgen
Date Thu, 22 Oct 2015 14:56:50 GMT
rerunning cgen


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

Branch: refs/heads/master
Commit: cc1eea87870edc5ef46bd1e13dd1f3934f0e1853
Parents: ed28881
Author: aadamchik <aadamchik@apache.org>
Authored: Thu Oct 22 17:31:07 2015 +0300
Committer: aadamchik <aadamchik@apache.org>
Committed: Thu Oct 22 17:37:27 2015 +0300

----------------------------------------------------------------------
 .../apache/cayenne/lifecycle/db/Auditable1.java |  2 ++
 .../apache/cayenne/lifecycle/db/Auditable2.java |  4 ++-
 .../cayenne/lifecycle/db/AuditableChild1.java   |  2 ++
 .../cayenne/lifecycle/db/AuditableChild2.java   |  2 +-
 .../cayenne/lifecycle/db/AuditableChild3.java   |  4 +--
 .../lifecycle/db/AuditableChildUuid.java        |  6 ++--
 .../org/apache/cayenne/lifecycle/db/E1.java     |  2 +-
 .../org/apache/cayenne/lifecycle/db/E2.java     |  2 +-
 .../apache/cayenne/lifecycle/db/SortDep.java    |  2 +-
 .../apache/cayenne/lifecycle/db/SortRoot.java   |  2 +-
 .../apache/cayenne/lifecycle/db/UuidRoot1.java  |  4 +--
 .../postcommit/PostCommitFilter_AllIT.java      | 35 +++++++++++---------
 .../postcommit/PostCommitFilter_FilteredIT.java | 10 +++---
 13 files changed, 44 insertions(+), 33 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cayenne/blob/cc1eea87/cayenne-lifecycle/src/test/java/org/apache/cayenne/lifecycle/db/Auditable1.java
----------------------------------------------------------------------
diff --git a/cayenne-lifecycle/src/test/java/org/apache/cayenne/lifecycle/db/Auditable1.java
b/cayenne-lifecycle/src/test/java/org/apache/cayenne/lifecycle/db/Auditable1.java
index ccd68ce..4cb7ff1 100644
--- a/cayenne-lifecycle/src/test/java/org/apache/cayenne/lifecycle/db/Auditable1.java
+++ b/cayenne-lifecycle/src/test/java/org/apache/cayenne/lifecycle/db/Auditable1.java
@@ -24,4 +24,6 @@ import org.apache.cayenne.lifecycle.db.auto._Auditable1;
 @Auditable
 public class Auditable1 extends _Auditable1 {
 
+	private static final long serialVersionUID = 8458581370578140962L;
+
 }

http://git-wip-us.apache.org/repos/asf/cayenne/blob/cc1eea87/cayenne-lifecycle/src/test/java/org/apache/cayenne/lifecycle/db/Auditable2.java
----------------------------------------------------------------------
diff --git a/cayenne-lifecycle/src/test/java/org/apache/cayenne/lifecycle/db/Auditable2.java
b/cayenne-lifecycle/src/test/java/org/apache/cayenne/lifecycle/db/Auditable2.java
index 7cce5d8..854b0ac 100644
--- a/cayenne-lifecycle/src/test/java/org/apache/cayenne/lifecycle/db/Auditable2.java
+++ b/cayenne-lifecycle/src/test/java/org/apache/cayenne/lifecycle/db/Auditable2.java
@@ -21,7 +21,9 @@ package org.apache.cayenne.lifecycle.db;
 import org.apache.cayenne.lifecycle.audit.Auditable;
 import org.apache.cayenne.lifecycle.db.auto._Auditable2;
 
-@Auditable(ignoredProperties = _Auditable2.CHAR_PROPERTY1_PROPERTY, confidential=_Auditable2.CHAR_PROPERTY2_PROPERTY)
+@Auditable(ignoredProperties = "charProperty1", confidential = "charProperty2")
 public class Auditable2 extends _Auditable2 {
 
+	private static final long serialVersionUID = 5203324250911707978L;
+
 }

http://git-wip-us.apache.org/repos/asf/cayenne/blob/cc1eea87/cayenne-lifecycle/src/test/java/org/apache/cayenne/lifecycle/db/AuditableChild1.java
----------------------------------------------------------------------
diff --git a/cayenne-lifecycle/src/test/java/org/apache/cayenne/lifecycle/db/AuditableChild1.java
b/cayenne-lifecycle/src/test/java/org/apache/cayenne/lifecycle/db/AuditableChild1.java
index d567f5f..9039a08 100644
--- a/cayenne-lifecycle/src/test/java/org/apache/cayenne/lifecycle/db/AuditableChild1.java
+++ b/cayenne-lifecycle/src/test/java/org/apache/cayenne/lifecycle/db/AuditableChild1.java
@@ -22,4 +22,6 @@ import org.apache.cayenne.lifecycle.db.auto._AuditableChild1;
 
 public class AuditableChild1 extends _AuditableChild1 {
 
+	private static final long serialVersionUID = 7967782239405764614L;
+
 }

http://git-wip-us.apache.org/repos/asf/cayenne/blob/cc1eea87/cayenne-lifecycle/src/test/java/org/apache/cayenne/lifecycle/db/AuditableChild2.java
----------------------------------------------------------------------
diff --git a/cayenne-lifecycle/src/test/java/org/apache/cayenne/lifecycle/db/AuditableChild2.java
b/cayenne-lifecycle/src/test/java/org/apache/cayenne/lifecycle/db/AuditableChild2.java
index b9bae82..547f8fc 100644
--- a/cayenne-lifecycle/src/test/java/org/apache/cayenne/lifecycle/db/AuditableChild2.java
+++ b/cayenne-lifecycle/src/test/java/org/apache/cayenne/lifecycle/db/AuditableChild2.java
@@ -21,5 +21,5 @@ package org.apache.cayenne.lifecycle.db;
 import org.apache.cayenne.lifecycle.db.auto._AuditableChild2;
 
 public class AuditableChild2 extends _AuditableChild2 {
-
+	private static final long serialVersionUID = 1L;
 }

http://git-wip-us.apache.org/repos/asf/cayenne/blob/cc1eea87/cayenne-lifecycle/src/test/java/org/apache/cayenne/lifecycle/db/AuditableChild3.java
----------------------------------------------------------------------
diff --git a/cayenne-lifecycle/src/test/java/org/apache/cayenne/lifecycle/db/AuditableChild3.java
b/cayenne-lifecycle/src/test/java/org/apache/cayenne/lifecycle/db/AuditableChild3.java
index a6bc631..556eaaa 100644
--- a/cayenne-lifecycle/src/test/java/org/apache/cayenne/lifecycle/db/AuditableChild3.java
+++ b/cayenne-lifecycle/src/test/java/org/apache/cayenne/lifecycle/db/AuditableChild3.java
@@ -21,7 +21,7 @@ package org.apache.cayenne.lifecycle.db;
 import org.apache.cayenne.lifecycle.audit.AuditableChild;
 import org.apache.cayenne.lifecycle.db.auto._AuditableChild3;
 
-@AuditableChild(value = _AuditableChild3.PARENT_PROPERTY, ignoredProperties = _AuditableChild3.CHAR_PROPERTY1_PROPERTY)
+@AuditableChild(value = "parent", ignoredProperties = "charProperty1")
 public class AuditableChild3 extends _AuditableChild3 {
-
+	private static final long serialVersionUID = 1L;
 }

http://git-wip-us.apache.org/repos/asf/cayenne/blob/cc1eea87/cayenne-lifecycle/src/test/java/org/apache/cayenne/lifecycle/db/AuditableChildUuid.java
----------------------------------------------------------------------
diff --git a/cayenne-lifecycle/src/test/java/org/apache/cayenne/lifecycle/db/AuditableChildUuid.java
b/cayenne-lifecycle/src/test/java/org/apache/cayenne/lifecycle/db/AuditableChildUuid.java
index 873c64e..38becd8 100644
--- a/cayenne-lifecycle/src/test/java/org/apache/cayenne/lifecycle/db/AuditableChildUuid.java
+++ b/cayenne-lifecycle/src/test/java/org/apache/cayenne/lifecycle/db/AuditableChildUuid.java
@@ -22,7 +22,9 @@ import org.apache.cayenne.lifecycle.audit.AuditableChild;
 import org.apache.cayenne.lifecycle.db.auto._AuditableChildUuid;
 import org.apache.cayenne.lifecycle.relationship.ObjectIdRelationship;
 
-@ObjectIdRelationship(_AuditableChildUuid.UUID_PROPERTY)
-@AuditableChild(objectIdRelationship = _AuditableChildUuid.UUID_PROPERTY)
+@ObjectIdRelationship("uuid")
+@AuditableChild(objectIdRelationship = "uuid")
 public class AuditableChildUuid extends _AuditableChildUuid {
+
+	private static final long serialVersionUID = 1L;
 }

http://git-wip-us.apache.org/repos/asf/cayenne/blob/cc1eea87/cayenne-lifecycle/src/test/java/org/apache/cayenne/lifecycle/db/E1.java
----------------------------------------------------------------------
diff --git a/cayenne-lifecycle/src/test/java/org/apache/cayenne/lifecycle/db/E1.java b/cayenne-lifecycle/src/test/java/org/apache/cayenne/lifecycle/db/E1.java
index 478fb45..d08294d 100644
--- a/cayenne-lifecycle/src/test/java/org/apache/cayenne/lifecycle/db/E1.java
+++ b/cayenne-lifecycle/src/test/java/org/apache/cayenne/lifecycle/db/E1.java
@@ -21,5 +21,5 @@ package org.apache.cayenne.lifecycle.db;
 import org.apache.cayenne.lifecycle.db.auto._E1;
 
 public class E1 extends _E1 {
-
+	private static final long serialVersionUID = 1L;
 }

http://git-wip-us.apache.org/repos/asf/cayenne/blob/cc1eea87/cayenne-lifecycle/src/test/java/org/apache/cayenne/lifecycle/db/E2.java
----------------------------------------------------------------------
diff --git a/cayenne-lifecycle/src/test/java/org/apache/cayenne/lifecycle/db/E2.java b/cayenne-lifecycle/src/test/java/org/apache/cayenne/lifecycle/db/E2.java
index 43a9cc1..b58c371 100644
--- a/cayenne-lifecycle/src/test/java/org/apache/cayenne/lifecycle/db/E2.java
+++ b/cayenne-lifecycle/src/test/java/org/apache/cayenne/lifecycle/db/E2.java
@@ -21,5 +21,5 @@ package org.apache.cayenne.lifecycle.db;
 import org.apache.cayenne.lifecycle.db.auto._E2;
 
 public class E2 extends _E2 {
-
+	private static final long serialVersionUID = 1L;
 }

http://git-wip-us.apache.org/repos/asf/cayenne/blob/cc1eea87/cayenne-lifecycle/src/test/java/org/apache/cayenne/lifecycle/db/SortDep.java
----------------------------------------------------------------------
diff --git a/cayenne-lifecycle/src/test/java/org/apache/cayenne/lifecycle/db/SortDep.java
b/cayenne-lifecycle/src/test/java/org/apache/cayenne/lifecycle/db/SortDep.java
index beedc7d..d7cb404 100644
--- a/cayenne-lifecycle/src/test/java/org/apache/cayenne/lifecycle/db/SortDep.java
+++ b/cayenne-lifecycle/src/test/java/org/apache/cayenne/lifecycle/db/SortDep.java
@@ -21,5 +21,5 @@ package org.apache.cayenne.lifecycle.db;
 import org.apache.cayenne.lifecycle.db.auto._SortDep;
 
 public class SortDep extends _SortDep {
-
+	private static final long serialVersionUID = 1L;
 }

http://git-wip-us.apache.org/repos/asf/cayenne/blob/cc1eea87/cayenne-lifecycle/src/test/java/org/apache/cayenne/lifecycle/db/SortRoot.java
----------------------------------------------------------------------
diff --git a/cayenne-lifecycle/src/test/java/org/apache/cayenne/lifecycle/db/SortRoot.java
b/cayenne-lifecycle/src/test/java/org/apache/cayenne/lifecycle/db/SortRoot.java
index e97b509..c2e98fb 100644
--- a/cayenne-lifecycle/src/test/java/org/apache/cayenne/lifecycle/db/SortRoot.java
+++ b/cayenne-lifecycle/src/test/java/org/apache/cayenne/lifecycle/db/SortRoot.java
@@ -23,5 +23,5 @@ import org.apache.cayenne.lifecycle.sort.SortWeight;
 
 @SortWeight(2)
 public class SortRoot extends _SortRoot {
-
+	private static final long serialVersionUID = 1L;
 }

http://git-wip-us.apache.org/repos/asf/cayenne/blob/cc1eea87/cayenne-lifecycle/src/test/java/org/apache/cayenne/lifecycle/db/UuidRoot1.java
----------------------------------------------------------------------
diff --git a/cayenne-lifecycle/src/test/java/org/apache/cayenne/lifecycle/db/UuidRoot1.java
b/cayenne-lifecycle/src/test/java/org/apache/cayenne/lifecycle/db/UuidRoot1.java
index c6bcb30..3ae2022 100644
--- a/cayenne-lifecycle/src/test/java/org/apache/cayenne/lifecycle/db/UuidRoot1.java
+++ b/cayenne-lifecycle/src/test/java/org/apache/cayenne/lifecycle/db/UuidRoot1.java
@@ -21,7 +21,7 @@ package org.apache.cayenne.lifecycle.db;
 import org.apache.cayenne.lifecycle.db.auto._UuidRoot1;
 import org.apache.cayenne.lifecycle.relationship.ObjectIdRelationship;
 
-@ObjectIdRelationship(_UuidRoot1.UUID_PROPERTY)
+@ObjectIdRelationship("uuid")
 public class UuidRoot1 extends _UuidRoot1 {
-
+	 private static final long serialVersionUID = 1L;
 }

http://git-wip-us.apache.org/repos/asf/cayenne/blob/cc1eea87/cayenne-lifecycle/src/test/java/org/apache/cayenne/lifecycle/postcommit/PostCommitFilter_AllIT.java
----------------------------------------------------------------------
diff --git a/cayenne-lifecycle/src/test/java/org/apache/cayenne/lifecycle/postcommit/PostCommitFilter_AllIT.java
b/cayenne-lifecycle/src/test/java/org/apache/cayenne/lifecycle/postcommit/PostCommitFilter_AllIT.java
index aef0176..f2ba0ea 100644
--- a/cayenne-lifecycle/src/test/java/org/apache/cayenne/lifecycle/postcommit/PostCommitFilter_AllIT.java
+++ b/cayenne-lifecycle/src/test/java/org/apache/cayenne/lifecycle/postcommit/PostCommitFilter_AllIT.java
@@ -87,7 +87,7 @@ public class PostCommitFilter_AllIT extends LifecycleServerCase {
 				assertNotNull(c);
 				assertEquals(ObjectChangeType.INSERT, c.getType());
 				assertEquals(1, c.getAttributeChanges().size());
-				assertEquals("yy", c.getAttributeChanges().get(Auditable1.CHAR_PROPERTY1_PROPERTY).getNewValue());
+				assertEquals("yy", c.getAttributeChanges().get(Auditable1.CHAR_PROPERTY1.getName()).getNewValue());
 
 				assertNotEquals(preCommitId, a1.getObjectId());
 				assertEquals(preCommitId, c.getPreCommitId());
@@ -104,7 +104,7 @@ public class PostCommitFilter_AllIT extends LifecycleServerCase {
 
 	@Test
 	public void testPostCommit_Update() throws SQLException {
-		
+
 		auditable1.insert(1, "xx");
 
 		final Auditable1 a1 = SelectById.query(Auditable1.class, 1).selectOne(context);
@@ -126,11 +126,11 @@ public class PostCommitFilter_AllIT extends LifecycleServerCase {
 				assertNotNull(c);
 				assertEquals(ObjectChangeType.UPDATE, c.getType());
 				assertEquals(1, c.getAttributeChanges().size());
-				AttributeChange pc = c.getAttributeChanges().get(Auditable1.CHAR_PROPERTY1_PROPERTY);
+				AttributeChange pc = c.getAttributeChanges().get(Auditable1.CHAR_PROPERTY1.getName());
 				assertNotNull(pc);
 				assertEquals("xx", pc.getOldValue());
 				assertEquals("yy", pc.getNewValue());
-				
+
 				assertEquals(preCommitId, a1.getObjectId());
 				assertEquals(preCommitId, c.getPreCommitId());
 				assertEquals(preCommitId, c.getPostCommitId());
@@ -162,8 +162,8 @@ public class PostCommitFilter_AllIT extends LifecycleServerCase {
 				assertNotNull(c);
 				assertEquals(ObjectChangeType.DELETE, c.getType());
 				assertEquals(1, c.getAttributeChanges().size());
-				assertEquals("xx", c.getAttributeChanges().get(Auditable1.CHAR_PROPERTY1_PROPERTY).getOldValue());
-				assertNull(c.getAttributeChanges().get(Auditable1.CHAR_PROPERTY1_PROPERTY).getNewValue());
+				assertEquals("xx", c.getAttributeChanges().get(Auditable1.CHAR_PROPERTY1.getName()).getOldValue());
+				assertNull(c.getAttributeChanges().get(Auditable1.CHAR_PROPERTY1.getName()).getNewValue());
 
 				return null;
 			}
@@ -202,27 +202,30 @@ public class PostCommitFilter_AllIT extends LifecycleServerCase {
 				assertNotNull(changes);
 				assertEquals(4, changes.getUniqueChanges().size());
 
-				ObjectChange ac1c = changes.getChanges()
-						.get(new ObjectId("AuditableChild1", AuditableChild1.ID_PK_COLUMN, 1));
+				ObjectChange ac1c = changes.getChanges().get(
+						new ObjectId("AuditableChild1", AuditableChild1.ID_PK_COLUMN, 1));
 				assertNotNull(ac1c);
 				assertEquals(ObjectChangeType.UPDATE, ac1c.getType());
-				ToOneRelationshipChange ac1c1 = ac1c.getToOneRelationshipChanges().get(AuditableChild1.PARENT_PROPERTY);
+				ToOneRelationshipChange ac1c1 = ac1c.getToOneRelationshipChanges()
+						.get(AuditableChild1.PARENT.getName());
 				assertEquals(a1.getObjectId(), ac1c1.getOldValue());
 				assertEquals(null, ac1c1.getNewValue());
 
-				ObjectChange ac2c = changes.getChanges()
-						.get(new ObjectId("AuditableChild1", AuditableChild1.ID_PK_COLUMN, 2));
+				ObjectChange ac2c = changes.getChanges().get(
+						new ObjectId("AuditableChild1", AuditableChild1.ID_PK_COLUMN, 2));
 				assertNotNull(ac2c);
 				assertEquals(ObjectChangeType.UPDATE, ac2c.getType());
-				ToOneRelationshipChange ac2c1 = ac2c.getToOneRelationshipChanges().get(AuditableChild1.PARENT_PROPERTY);
+				ToOneRelationshipChange ac2c1 = ac2c.getToOneRelationshipChanges()
+						.get(AuditableChild1.PARENT.getName());
 				assertEquals(a2.getObjectId(), ac2c1.getOldValue());
 				assertEquals(a1.getObjectId(), ac2c1.getNewValue());
 
-				ObjectChange ac3c = changes.getChanges()
-						.get(new ObjectId("AuditableChild1", AuditableChild1.ID_PK_COLUMN, 3));
+				ObjectChange ac3c = changes.getChanges().get(
+						new ObjectId("AuditableChild1", AuditableChild1.ID_PK_COLUMN, 3));
 				assertNotNull(ac3c);
 				assertEquals(ObjectChangeType.UPDATE, ac3c.getType());
-				ToOneRelationshipChange ac3c1 = ac3c.getToOneRelationshipChanges().get(AuditableChild1.PARENT_PROPERTY);
+				ToOneRelationshipChange ac3c1 = ac3c.getToOneRelationshipChanges()
+						.get(AuditableChild1.PARENT.getName());
 				assertEquals(null, ac3c1.getOldValue());
 				assertEquals(a1.getObjectId(), ac3c1.getNewValue());
 
@@ -269,7 +272,7 @@ public class PostCommitFilter_AllIT extends LifecycleServerCase {
 
 				assertEquals(1, a1c.getToManyRelationshipChanges().size());
 
-				ToManyRelationshipChange a1c1 = a1c.getToManyRelationshipChanges().get(Auditable1.CHILDREN1_PROPERTY);
+				ToManyRelationshipChange a1c1 = a1c.getToManyRelationshipChanges().get(Auditable1.CHILDREN1.getName());
 				assertNotNull(a1c1);
 
 				assertEquals(2, a1c1.getAdded().size());

http://git-wip-us.apache.org/repos/asf/cayenne/blob/cc1eea87/cayenne-lifecycle/src/test/java/org/apache/cayenne/lifecycle/postcommit/PostCommitFilter_FilteredIT.java
----------------------------------------------------------------------
diff --git a/cayenne-lifecycle/src/test/java/org/apache/cayenne/lifecycle/postcommit/PostCommitFilter_FilteredIT.java
b/cayenne-lifecycle/src/test/java/org/apache/cayenne/lifecycle/postcommit/PostCommitFilter_FilteredIT.java
index d49b5ff..23f1519 100644
--- a/cayenne-lifecycle/src/test/java/org/apache/cayenne/lifecycle/postcommit/PostCommitFilter_FilteredIT.java
+++ b/cayenne-lifecycle/src/test/java/org/apache/cayenne/lifecycle/postcommit/PostCommitFilter_FilteredIT.java
@@ -51,8 +51,8 @@ public class PostCommitFilter_FilteredIT extends LifecycleServerCase {
 	@Override
 	protected ServerRuntimeBuilder configureCayenne() {
 		this.mockListener = mock(PostCommitListener.class);
-		return super.configureCayenne()
-				.addModule(PostCommitModuleBuilder.builder().auditableEntitiesOnly().listener(mockListener).build());
+		return super.configureCayenne().addModule(
+				PostCommitModuleBuilder.builder().auditableEntitiesOnly().listener(mockListener).build());
 	}
 
 	@Before
@@ -80,7 +80,7 @@ public class PostCommitFilter_FilteredIT extends LifecycleServerCase {
 				assertEquals(1, c.getAttributeChanges().size());
 
 				assertEquals(Confidential.getInstance(),
-						c.getAttributeChanges().get(Auditable2.CHAR_PROPERTY2_PROPERTY).getNewValue());
+						c.getAttributeChanges().get(Auditable2.CHAR_PROPERTY2.getName()).getNewValue());
 
 				return null;
 			}
@@ -112,7 +112,7 @@ public class PostCommitFilter_FilteredIT extends LifecycleServerCase {
 				assertNotNull(c);
 				assertEquals(ObjectChangeType.UPDATE, c.getType());
 				assertEquals(1, c.getAttributeChanges().size());
-				AttributeChange pc = c.getAttributeChanges().get(Auditable2.CHAR_PROPERTY2_PROPERTY);
+				AttributeChange pc = c.getAttributeChanges().get(Auditable2.CHAR_PROPERTY2.getName());
 				assertNotNull(pc);
 				assertEquals(Confidential.getInstance(), pc.getOldValue());
 				assertEquals(Confidential.getInstance(), pc.getNewValue());
@@ -148,7 +148,7 @@ public class PostCommitFilter_FilteredIT extends LifecycleServerCase {
 				assertEquals(ObjectChangeType.DELETE, c.getType());
 				assertEquals(1, c.getAttributeChanges().size());
 				assertEquals(Confidential.getInstance(),
-						c.getAttributeChanges().get(Auditable2.CHAR_PROPERTY2_PROPERTY).getOldValue());
+						c.getAttributeChanges().get(Auditable2.CHAR_PROPERTY2.getName()).getOldValue());
 
 				return null;
 			}


Mime
View raw message