continuum-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ri...@apache.org
Subject svn commit: r490680 - in /maven/continuum/branches/key-based-refactor/continuum-store/src/main/java/org/apache/maven/continuum/store/jdo: AbstractJdoStore.java JdoProjectGroupStore.java JdoProjectStore.java JdoSystemStore.java
Date Thu, 28 Dec 2006 08:52:16 GMT
Author: rinku
Date: Thu Dec 28 00:52:15 2006
New Revision: 490680

URL: http://svn.apache.org/viewvc?view=rev&rev=490680
Log:
o  updated store impls to align with Store interface updates.

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
    maven/continuum/branches/key-based-refactor/continuum-store/src/main/java/org/apache/maven/continuum/store/jdo/JdoSystemStore.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=490680&r1=490679&r2=490680
==============================================================================
--- 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
Thu Dec 28 00:52:15 2006
@@ -27,6 +27,8 @@
 import javax.jdo.PersistenceManagerFactory;
 import javax.jdo.Transaction;
 
+import java.util.List;
+
 /**
  * Covenience base class that consolidates some common methods used by
  * extensions.
@@ -157,6 +159,20 @@
         {
             throw new ContinuumStoreException( e.getMessage(), e );
         }
+    }
+
+    /**
+     * TODO: Document!
+     * 
+     * @param clazz
+     * @param ordering
+     * @param fetchGroup
+     * 
+     * @return
+     */
+    protected List getAllObjectsDetached( Class clazz, String ordering, String fetchGroup
)
+    {
+        return PlexusJdoUtils.getAllObjectsDetached( getPersistenceManager(), clazz, ordering,
fetchGroup );
     }
 
 }

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=490680&r1=490679&r2=490680
==============================================================================
--- 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
Thu Dec 28 00:52:15 2006
@@ -22,6 +22,8 @@
 import org.apache.maven.continuum.store.ContinuumStoreException;
 import org.apache.maven.continuum.store.ProjectGroupStore;
 
+import java.util.List;
+
 /**
  * Concrete implementation for {@link ProjectGroupStore}.
  * 
@@ -54,7 +56,6 @@
         throws ContinuumObjectNotFoundException, ContinuumStoreException
     {
         return (ProjectGroup) getObjectFromQuery( ProjectGroup.class, "key", key.getProjectKey(),
null );
-
     }
 
     /**
@@ -66,6 +67,16 @@
     {
         updateObject( group );
         return group;
+    }
+
+    /**
+     * {@inheritDoc}
+     * 
+     * @see org.apache.maven.continuum.store.ProjectGroupStore#getAllProjectGroups()
+     */
+    public List getAllProjectGroups() throws ContinuumStoreException
+    {
+        return getAllObjectsDetached( ProjectGroup.class, "name ascending", null );
     }
 
 }

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=490680&r1=490679&r2=490680
==============================================================================
--- 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
Thu Dec 28 00:52:15 2006
@@ -108,4 +108,15 @@
         updateObject( project );
         return project;
     }
+
+    /**
+     * {@inheritDoc}
+     * 
+     * @see org.apache.maven.continuum.store.ProjectStore#getAllProjects()
+     */
+    public List getAllProjects() throws ContinuumStoreException
+    {
+        return getAllObjectsDetached( Project.class, "name ascending", null );
+    }
+
 }

Modified: maven/continuum/branches/key-based-refactor/continuum-store/src/main/java/org/apache/maven/continuum/store/jdo/JdoSystemStore.java
URL: http://svn.apache.org/viewvc/maven/continuum/branches/key-based-refactor/continuum-store/src/main/java/org/apache/maven/continuum/store/jdo/JdoSystemStore.java?view=diff&rev=490680&r1=490679&r2=490680
==============================================================================
--- maven/continuum/branches/key-based-refactor/continuum-store/src/main/java/org/apache/maven/continuum/store/jdo/JdoSystemStore.java
(original)
+++ maven/continuum/branches/key-based-refactor/continuum-store/src/main/java/org/apache/maven/continuum/store/jdo/JdoSystemStore.java
Thu Dec 28 00:52:15 2006
@@ -24,6 +24,8 @@
 import org.apache.maven.continuum.store.ContinuumStoreException;
 import org.apache.maven.continuum.store.SystemStore;
 
+import java.util.List;
+
 /**
  * Concrete implementation for {@link SystemStore}.
  * 
@@ -164,6 +166,46 @@
     {
         updateObject( systemConfiguration );
         return systemConfiguration;
+    }
+
+    /**
+     * {@inheritDoc}
+     * 
+     * @see org.apache.maven.continuum.store.SystemStore#getAllInstallations()
+     */
+    public List getAllInstallations() throws ContinuumStoreException
+    {
+        return getAllObjectsDetached( Installation.class, "name ascending", null );
+    }
+
+    /**
+     * {@inheritDoc}
+     * 
+     * @see org.apache.maven.continuum.store.SystemStore#getAllProfiles()
+     */
+    public List getAllProfiles() throws ContinuumStoreException
+    {
+        return getAllObjectsDetached( Profile.class, "name ascending", null );
+    }
+
+    /**
+     * {@inheritDoc}
+     * 
+     * @see org.apache.maven.continuum.store.SystemStore#getAllSchedules()
+     */
+    public List getAllSchedules() throws ContinuumStoreException
+    {
+        return getAllObjectsDetached( Schedule.class, "name ascending", null );
+    }
+
+    /**
+     * {@inheritDoc}
+     * 
+     * @see org.apache.maven.continuum.store.SystemStore#getAllSystemConfigurations()
+     */
+    public List getAllSystemConfigurations() throws ContinuumStoreException
+    {
+        return getAllObjectsDetached( SystemConfiguration.class, "name ascending", null );
     }
 
 }



Mime
View raw message