continuum-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jmcconn...@apache.org
Subject svn commit: r489947 - in /maven/continuum/branches/key-based-refactor: continuum-api/src/main/java/org/apache/maven/continuum/key/ continuum-api/src/main/java/org/apache/maven/continuum/store/ continuum-store/src/main/java/org/apache/maven/continuum/st...
Date Sat, 23 Dec 2006 23:03:18 GMT
Author: jmcconnell
Date: Sat Dec 23 15:03:18 2006
New Revision: 489947

URL: http://svn.apache.org/viewvc?view=rev&rev=489947
Log:
added groupProject key pojo to api and tweaked one method in the store-api...handing off to
rahul to take the store api and start on some tests for it as well

Added:
    maven/continuum/branches/key-based-refactor/continuum-api/src/main/java/org/apache/maven/continuum/key/
    maven/continuum/branches/key-based-refactor/continuum-api/src/main/java/org/apache/maven/continuum/key/GroupProjectKey.java
  (with props)
Modified:
    maven/continuum/branches/key-based-refactor/continuum-api/src/main/java/org/apache/maven/continuum/store/ContinuumStore.java
    maven/continuum/branches/key-based-refactor/continuum-store/src/main/java/org/apache/maven/continuum/store/JdoContinuumStore.java

Added: maven/continuum/branches/key-based-refactor/continuum-api/src/main/java/org/apache/maven/continuum/key/GroupProjectKey.java
URL: http://svn.apache.org/viewvc/maven/continuum/branches/key-based-refactor/continuum-api/src/main/java/org/apache/maven/continuum/key/GroupProjectKey.java?view=auto&rev=489947
==============================================================================
--- maven/continuum/branches/key-based-refactor/continuum-api/src/main/java/org/apache/maven/continuum/key/GroupProjectKey.java
(added)
+++ maven/continuum/branches/key-based-refactor/continuum-api/src/main/java/org/apache/maven/continuum/key/GroupProjectKey.java
Sat Dec 23 15:03:18 2006
@@ -0,0 +1,49 @@
+package org.apache.maven.continuum.key;
+/*
+ * Copyright 2006 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+ * GroupProjectKey:
+ *
+ * @author: Jesse McConnell <jmcconnell@apache.org>
+ * @version: $ID:$
+ */
+public class GroupProjectKey
+{
+    private String groupKey;
+
+    private String projectKey;
+
+    public String getGroupKey()
+    {
+        return groupKey;
+    }
+
+    public void setGroupKey( String groupKey )
+    {
+        this.groupKey = groupKey;
+    }
+
+    public String getProjectKey()
+    {
+        return projectKey;
+    }
+
+    public void setProjectKey( String projectKey )
+    {
+        this.projectKey = projectKey;
+    }
+}

Propchange: maven/continuum/branches/key-based-refactor/continuum-api/src/main/java/org/apache/maven/continuum/key/GroupProjectKey.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: maven/continuum/branches/key-based-refactor/continuum-api/src/main/java/org/apache/maven/continuum/store/ContinuumStore.java
URL: http://svn.apache.org/viewvc/maven/continuum/branches/key-based-refactor/continuum-api/src/main/java/org/apache/maven/continuum/store/ContinuumStore.java?view=diff&rev=489947&r1=489946&r2=489947
==============================================================================
--- maven/continuum/branches/key-based-refactor/continuum-api/src/main/java/org/apache/maven/continuum/store/ContinuumStore.java
(original)
+++ maven/continuum/branches/key-based-refactor/continuum-api/src/main/java/org/apache/maven/continuum/store/ContinuumStore.java
Sat Dec 23 15:03:18 2006
@@ -25,6 +25,7 @@
 import org.apache.maven.continuum.model.project.Schedule;
 import org.apache.maven.continuum.model.system.Installation;
 import org.apache.maven.continuum.model.system.SystemConfiguration;
+import org.apache.maven.continuum.key.GroupProjectKey;
 
 import java.util.Collection;
 import java.util.List;
@@ -53,13 +54,13 @@
      * <p/>
      * this should be the most common usage of the default build definition accessing methods
      *
-     * @param projectId
+     * @param groupProjectKey
      * @return
      * @throws ContinuumStoreException
      * @throws ContinuumObjectNotFoundException
      *
      */
-    BuildDefinition getDefaultBuildDefinition( int projectId )
+    BuildDefinition getDefaultBuildDefinition( GroupProjectKey groupProjectKey )
         throws ContinuumStoreException, ContinuumObjectNotFoundException;
 
     /**

Modified: maven/continuum/branches/key-based-refactor/continuum-store/src/main/java/org/apache/maven/continuum/store/JdoContinuumStore.java
URL: http://svn.apache.org/viewvc/maven/continuum/branches/key-based-refactor/continuum-store/src/main/java/org/apache/maven/continuum/store/JdoContinuumStore.java?view=diff&rev=489947&r1=489946&r2=489947
==============================================================================
--- maven/continuum/branches/key-based-refactor/continuum-store/src/main/java/org/apache/maven/continuum/store/JdoContinuumStore.java
(original)
+++ maven/continuum/branches/key-based-refactor/continuum-store/src/main/java/org/apache/maven/continuum/store/JdoContinuumStore.java
Sat Dec 23 15:03:18 2006
@@ -598,10 +598,10 @@
     }
 
 
-    public BuildDefinition getDefaultBuildDefinitionForProjectGroup( int projectGroupId )
+    public BuildDefinition getDefaultBuildDefinitionForProjectGroup( String groupKey )
         throws ContinuumStoreException, ContinuumObjectNotFoundException
     {
-        ProjectGroup projectGroup = getProjectGroupWithBuildDetails( projectGroupId );
+        ProjectGroup projectGroup = getProjectGroupWithBuildDetails( groupKey );
 
         for ( Iterator i = projectGroup.getBuildDefinitions().iterator(); i.hasNext(); )
         {
@@ -722,10 +722,10 @@
         PlexusJdoUtils.rollbackIfActive( tx );
     }
 
-    public ProjectGroup getProjectGroup( int projectGroupId )
+    public ProjectGroup getProjectGroup( String groupKey )
         throws ContinuumStoreException, ContinuumObjectNotFoundException
     {
-        return (ProjectGroup) getObjectById( ProjectGroup.class, projectGroupId );
+        return (ProjectGroup) getObjectById( ProjectGroup.class, groupKey );
     }
 
     private Object getObjectById( Class clazz, int id )
@@ -792,7 +792,7 @@
     }
 
     // todo get this natively supported in the store
-    public List getProjectsWithDependenciesByGroupId( int projectGroupId )
+    public List getProjectsWithDependenciesByGroupId( String groupKey )
     {
         List allProjects = getAllObjectsDetached( Project.class, "name ascending", PROJECT_DEPENDENCIES_FETCH_GROUP
);
 
@@ -802,7 +802,7 @@
         {
             Project project = (Project) i.next();
 
-            if ( project.getProjectGroup().getId() == projectGroupId )
+            if ( project.getProjectGroup().getId() == groupKey )
             {
                 groupProjects.add( project );
             }



Mime
View raw message