continuum-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ri...@apache.org
Subject svn commit: r581143 - in /maven/continuum/branches/continuum-jpa/continuum-model-jpa/src/main/java/org/apache/maven/continuum/store/api: ProjectGroupQuery.java ProjectQuery.java Query.java
Date Tue, 02 Oct 2007 06:02:42 GMT
Author: rinku
Date: Mon Oct  1 23:02:41 2007
New Revision: 581143

URL: http://svn.apache.org/viewvc?rev=581143&view=rev
Log:
o  updates around queries.

Added:
    maven/continuum/branches/continuum-jpa/continuum-model-jpa/src/main/java/org/apache/maven/continuum/store/api/ProjectGroupQuery.java
    maven/continuum/branches/continuum-jpa/continuum-model-jpa/src/main/java/org/apache/maven/continuum/store/api/ProjectQuery.java
Modified:
    maven/continuum/branches/continuum-jpa/continuum-model-jpa/src/main/java/org/apache/maven/continuum/store/api/Query.java

Added: maven/continuum/branches/continuum-jpa/continuum-model-jpa/src/main/java/org/apache/maven/continuum/store/api/ProjectGroupQuery.java
URL: http://svn.apache.org/viewvc/maven/continuum/branches/continuum-jpa/continuum-model-jpa/src/main/java/org/apache/maven/continuum/store/api/ProjectGroupQuery.java?rev=581143&view=auto
==============================================================================
--- maven/continuum/branches/continuum-jpa/continuum-model-jpa/src/main/java/org/apache/maven/continuum/store/api/ProjectGroupQuery.java
(added)
+++ maven/continuum/branches/continuum-jpa/continuum-model-jpa/src/main/java/org/apache/maven/continuum/store/api/ProjectGroupQuery.java
Mon Oct  1 23:02:41 2007
@@ -0,0 +1,19 @@
+/**
+ * 
+ */
+package org.apache.maven.continuum.store.api;
+
+import org.apache.maven.continuum.model.project.ProjectGroup;
+
+/**
+ * Wraps up retrieval criteria for {@link ProjectGroup}s.
+ * 
+ * @author <a href='mailto:rinku@apache.org'>Rahul Thakur</a>
+ * @version $Id$
+ * @since 1.2
+ */
+public class ProjectGroupQuery
+    implements Query<ProjectGroup>
+{
+
+}

Added: maven/continuum/branches/continuum-jpa/continuum-model-jpa/src/main/java/org/apache/maven/continuum/store/api/ProjectQuery.java
URL: http://svn.apache.org/viewvc/maven/continuum/branches/continuum-jpa/continuum-model-jpa/src/main/java/org/apache/maven/continuum/store/api/ProjectQuery.java?rev=581143&view=auto
==============================================================================
--- maven/continuum/branches/continuum-jpa/continuum-model-jpa/src/main/java/org/apache/maven/continuum/store/api/ProjectQuery.java
(added)
+++ maven/continuum/branches/continuum-jpa/continuum-model-jpa/src/main/java/org/apache/maven/continuum/store/api/ProjectQuery.java
Mon Oct  1 23:02:41 2007
@@ -0,0 +1,174 @@
+/**
+ * 
+ */
+package org.apache.maven.continuum.store.api;
+
+import org.apache.maven.continuum.model.project.Project;
+
+/**
+ * Wraps up retrieval criteria for {@link Project}s.
+ * 
+ * @author <a href='mailto:rinku@apache.org'>Rahul Thakur</a>
+ * @version $Id$
+ * @since 1.2
+ */
+public class ProjectQuery
+    implements Query<Project>
+{
+
+    /**
+     * Project id criteria.
+     */
+    private Long id;
+
+    /**
+     * Project groupId criteria.
+     */
+    private String groupId;
+
+    /**
+     * Project artifactId criteria.
+     */
+    private String artifactId;
+
+    /**
+     * Project Artifact version criteria.
+     */
+    private String version;
+
+    /**
+     * Project name criteria.
+     */
+    private String name;
+
+    /**
+     * Determines if a Project id criteria was specified in the query.
+     * 
+     * @return
+     */
+    public boolean hasId()
+    {
+        return ( null != id && id >= 0 );
+    }
+
+    /**
+     * @return the id
+     */
+    public Long getId()
+    {
+        return id;
+    }
+
+    /**
+     * @param id the id to set
+     */
+    public void setId( Long id )
+    {
+        this.id = id;
+    }
+
+    /**
+     * Determines if a ProjectGroup Id criteria was specified.
+     * 
+     * @return
+     */
+    public boolean hasGroupId()
+    {
+        return ( null != groupId );
+    }
+
+    /**
+     * @return the groupId
+     */
+    public String getGroupId()
+    {
+        return groupId;
+    }
+
+    /**
+     * @param groupId the groupId to set
+     */
+    public void setGroupId( String groupId )
+    {
+        this.groupId = groupId;
+    }
+
+    /**
+     * Determines if an artifact Id criteria was specified.
+     * 
+     * @return
+     */
+    public boolean hasArtifactId()
+    {
+        return ( null != artifactId );
+    }
+
+    /**
+     * @return the artifactId
+     */
+    public String getArtifactId()
+    {
+        return artifactId;
+    }
+
+    /**
+     * @param artifactId the artifactId to set
+     */
+    public void setArtifactId( String artifactId )
+    {
+        this.artifactId = artifactId;
+    }
+
+    /**
+     * Determines if a Version criteria was specified.
+     * 
+     * @return
+     */
+    public boolean hasVersion()
+    {
+        return ( null != version );
+    }
+
+    /**
+     * @return the version
+     */
+    public String getVersion()
+    {
+        return version;
+    }
+
+    /**
+     * @param version the version to set
+     */
+    public void setVersion( String version )
+    {
+        this.version = version;
+    }
+
+    /**
+     * Determines if a project name criteria was specified.
+     * 
+     * @return
+     */
+    public boolean hasName()
+    {
+        return ( null != name );
+    }
+
+    /**
+     * @return the name
+     */
+    public String getName()
+    {
+        return name;
+    }
+
+    /**
+     * @param name the name to set
+     */
+    public void setName( String name )
+    {
+        this.name = name;
+    }
+
+}

Modified: maven/continuum/branches/continuum-jpa/continuum-model-jpa/src/main/java/org/apache/maven/continuum/store/api/Query.java
URL: http://svn.apache.org/viewvc/maven/continuum/branches/continuum-jpa/continuum-model-jpa/src/main/java/org/apache/maven/continuum/store/api/Query.java?rev=581143&r1=581142&r2=581143&view=diff
==============================================================================
--- maven/continuum/branches/continuum-jpa/continuum-model-jpa/src/main/java/org/apache/maven/continuum/store/api/Query.java
(original)
+++ maven/continuum/branches/continuum-jpa/continuum-model-jpa/src/main/java/org/apache/maven/continuum/store/api/Query.java
Mon Oct  1 23:02:41 2007
@@ -7,8 +7,10 @@
  * Wraps up Type Query criteria to be used by store extensions to obtaining matching type
instances.
  * 
  * @author <a href='mailto:rahul.thakur.xdev@gmail.com'>Rahul Thakur</a>
+ * @version $Id$
+ * @since 1.2
  */
-public abstract class Query
+public interface Query<Q>
 {
-    // TODO: Implement!
+    // Marker interface
 }



Mime
View raw message