Revision: 3858
Author: [email protected]
Date: Mon Aug  9 15:22:33 2010
Log: Cleanup of the workspaceRevision variable removed in the library.
http://code.google.com/p/power-architect/source/detail?r=3858

Modified:
/trunk/regress/ca/sqlpower/architect/enterprise/DomainCategorySnapshotTest.java /trunk/src/main/java/ca/sqlpower/architect/SPObjectSnapshotHierarchyListener.java /trunk/src/main/java/ca/sqlpower/architect/enterprise/DomainCategorySnapshot.java

=======================================
--- /trunk/regress/ca/sqlpower/architect/enterprise/DomainCategorySnapshotTest.java Wed Jul 14 16:06:30 2010 +++ /trunk/regress/ca/sqlpower/architect/enterprise/DomainCategorySnapshotTest.java Mon Aug 9 15:22:33 2010
@@ -38,7 +38,7 @@
         super.setUp();

         category = new DomainCategory("test");
-        categorySnapshot = new DomainCategorySnapshot(category, 0);
+        categorySnapshot = new DomainCategorySnapshot(category);

         getRootObject().addChild(category, 0);
         getRootObject().addChild(categorySnapshot, 0);
=======================================
--- /trunk/src/main/java/ca/sqlpower/architect/SPObjectSnapshotHierarchyListener.java Mon Aug 9 15:06:59 2010 +++ /trunk/src/main/java/ca/sqlpower/architect/SPObjectSnapshotHierarchyListener.java Mon Aug 9 15:22:33 2010
@@ -283,7 +283,6 @@
if (snapshotExists) return; // If snapshot already existed, then nothing else needs to be done

             // Otherwise, we have to create a new snapshot
- int systemRevision = session.getSystemSession().getCurrentRevisionNumber(); boolean isDomainSnapshot = upstreamType.getParent() instanceof DomainCategory;
             UserDefinedSQLTypeSnapshot snapshot;
             if (upstreamType.getUpstreamType() != null) {
@@ -306,21 +305,21 @@
                     }
                 }
                 if (!existingSnapshotFound) {
- upstreamSnapshot = new UserDefinedSQLTypeSnapshot(upUpStreamType, systemRevision, isUpstreamDomainSnapshot); + upstreamSnapshot = new UserDefinedSQLTypeSnapshot(upUpStreamType, isUpstreamDomainSnapshot);
                     collection.addChild(upstreamSnapshot, 0);
                     collection.addChild(upstreamSnapshot.getSPObject(), 0);
                     upstreamSnapshot.setSnapshotUseCount(1);
                     addUpdateListener(upstreamSnapshot.getSPObject());
                 }
- snapshot = new UserDefinedSQLTypeSnapshot(upstreamType, systemRevision, isDomainSnapshot, upstreamSnapshot); + snapshot = new UserDefinedSQLTypeSnapshot(upstreamType, isDomainSnapshot, upstreamSnapshot);
             } else {
- snapshot = new UserDefinedSQLTypeSnapshot(upstreamType, systemRevision, isDomainSnapshot); + snapshot = new UserDefinedSQLTypeSnapshot(upstreamType, isDomainSnapshot);
             }
             collection.addChild(snapshot, 0);
             if ((upstreamType.getParent() instanceof DomainCategory)) {
DomainCategory parent = (DomainCategory) upstreamType.getParent();
                 DomainCategorySnapshot domainSnapshot =
-                    new DomainCategorySnapshot(parent, systemRevision);
+                    new DomainCategorySnapshot(parent);
                 collection.addChild(domainSnapshot, 0);
                 collection.addChild(domainSnapshot.getSPObject(), 0);
domainSnapshot.getSPObject().addChild(snapshot.getSPObject(), 0);
=======================================
--- /trunk/src/main/java/ca/sqlpower/architect/enterprise/DomainCategorySnapshot.java Tue Aug 3 12:49:13 2010 +++ /trunk/src/main/java/ca/sqlpower/architect/enterprise/DomainCategorySnapshot.java Mon Aug 9 15:22:33 2010
@@ -34,15 +34,13 @@
     @Constructor
     public DomainCategorySnapshot(
@ConstructorParameter (propertyName = "spObject") DomainCategory spObject, - @ConstructorParameter (propertyName = "originalUUID") String originalUUID, - @ConstructorParameter (propertyName = "workspaceRevision") int systemRevision) {
-        super(originalUUID, systemRevision);
+ @ConstructorParameter (propertyName = "originalUUID") String originalUUID) {
+        super(originalUUID);
         this.spObject = spObject;
     }

-    public DomainCategorySnapshot(DomainCategory original,
-            int systemRevision) {
-        super(original.getUUID(), systemRevision);
+    public DomainCategorySnapshot(DomainCategory original) {
+        super(original.getUUID());
         setName(original.getName());
         spObject = new DomainCategory(original.getName());
     }

Reply via email to