continuum-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ri...@apache.org
Subject svn commit: r493296 - in /maven/continuum/branches/key-based-refactor/continuum-store/src/main/java/org/apache/maven/continuum/store/jdo: AbstractJdoStore.java JdoProjectGroupStore.java JdoProjectStore.java
Date Sat, 06 Jan 2007 04:27:13 GMT
Author: rinku
Date: Fri Jan  5 20:27:13 2007
New Revision: 493296

URL: http://svn.apache.org/viewvc?view=rev&rev=493296
Log:
o  clean ups.

Modified:
    maven/continuum/branches/key-based-refactor/continuum-store/src/main/java/org/apache/maven/continuum/store/jdo/AbstractJdoStore.java
    maven/continuum/branches/key-based-refactor/continuum-store/src/main/java/org/apache/maven/continuum/store/jdo/JdoProjectGroupStore.java
    maven/continuum/branches/key-based-refactor/continuum-store/src/main/java/org/apache/maven/continuum/store/jdo/JdoProjectStore.java

Modified: maven/continuum/branches/key-based-refactor/continuum-store/src/main/java/org/apache/maven/continuum/store/jdo/AbstractJdoStore.java
URL: http://svn.apache.org/viewvc/maven/continuum/branches/key-based-refactor/continuum-store/src/main/java/org/apache/maven/continuum/store/jdo/AbstractJdoStore.java?view=diff&rev=493296&r1=493295&r2=493296
==============================================================================
--- maven/continuum/branches/key-based-refactor/continuum-store/src/main/java/org/apache/maven/continuum/store/jdo/AbstractJdoStore.java
(original)
+++ maven/continuum/branches/key-based-refactor/continuum-store/src/main/java/org/apache/maven/continuum/store/jdo/AbstractJdoStore.java
Fri Jan  5 20:27:13 2007
@@ -161,6 +161,11 @@
         PlexusJdoUtils.rollbackIfActive( tx );
     }
 
+    protected Object addObject( Object object )
+    {
+        return PlexusJdoUtils.addObject( getPersistenceManager(), object );
+    }
+
     /**
      * Updates the specified object's properties in the underlying store.
      * 

Modified: maven/continuum/branches/key-based-refactor/continuum-store/src/main/java/org/apache/maven/continuum/store/jdo/JdoProjectGroupStore.java
URL: http://svn.apache.org/viewvc/maven/continuum/branches/key-based-refactor/continuum-store/src/main/java/org/apache/maven/continuum/store/jdo/JdoProjectGroupStore.java?view=diff&rev=493296&r1=493295&r2=493296
==============================================================================
--- maven/continuum/branches/key-based-refactor/continuum-store/src/main/java/org/apache/maven/continuum/store/jdo/JdoProjectGroupStore.java
(original)
+++ maven/continuum/branches/key-based-refactor/continuum-store/src/main/java/org/apache/maven/continuum/store/jdo/JdoProjectGroupStore.java
Fri Jan  5 20:27:13 2007
@@ -67,17 +67,11 @@
      */
     public ProjectGroup saveProjectGroup( ProjectGroup group ) throws ContinuumStoreException
     {
-        try
-        {
-            if ( group.getId() > 0 )
-                PlexusJdoUtils.saveObject( getPersistenceManager(), group, null );
-            else
-                PlexusJdoUtils.addObject( getPersistenceManager(), group, null );
-        }
-        catch ( PlexusStoreException e )
-        {
-            throw new ContinuumStoreException( "Error saving Project Group.", e );
-        }
+        if ( group.getId() > 0 )
+            updateObject( group );
+        else
+            addObject( group );
+
         return group;
     }
 

Modified: maven/continuum/branches/key-based-refactor/continuum-store/src/main/java/org/apache/maven/continuum/store/jdo/JdoProjectStore.java
URL: http://svn.apache.org/viewvc/maven/continuum/branches/key-based-refactor/continuum-store/src/main/java/org/apache/maven/continuum/store/jdo/JdoProjectStore.java?view=diff&rev=493296&r1=493295&r2=493296
==============================================================================
--- maven/continuum/branches/key-based-refactor/continuum-store/src/main/java/org/apache/maven/continuum/store/jdo/JdoProjectStore.java
(original)
+++ maven/continuum/branches/key-based-refactor/continuum-store/src/main/java/org/apache/maven/continuum/store/jdo/JdoProjectStore.java
Fri Jan  5 20:27:13 2007
@@ -107,17 +107,11 @@
      */
     public Project saveProject( Project project ) throws ContinuumStoreException
     {
-        try
-        {
-            if ( project.getId() > 0 )
-                PlexusJdoUtils.saveObject( getPersistenceManager(), project, new String[0]
);
-            else
-                PlexusJdoUtils.addObject( getPersistenceManager(), project );
-        }
-        catch ( PlexusStoreException e )
-        {
-            throw new ContinuumStoreException( "Error saving Project.", e );
-        }
+        if ( project.getId() > 0 )
+            updateObject( project );
+        else
+            addObject( project );
+
         return project;
     }
 



Mime
View raw message