This project has retired. For details please refer to its Attic page.
UniqueArtifactIdConstraint

org.apache.maven.archiva.database.constraints
Class UniqueArtifactIdConstraint

Package class diagram package UniqueArtifactIdConstraint
java.lang.Object
  extended by org.apache.maven.archiva.database.constraints.AbstractSimpleConstraint
      extended by org.apache.maven.archiva.database.constraints.UniqueArtifactIdConstraint
All Implemented Interfaces:
Constraint, SimpleConstraint

public class UniqueArtifactIdConstraint
extends AbstractSimpleConstraint
implements Constraint

Obtain a set of unique ArtifactIds for the specified groupId.


Field Summary
 
Fields inherited from class org.apache.maven.archiva.database.constraints.AbstractSimpleConstraint
params
 
Fields inherited from interface org.apache.maven.archiva.database.Constraint
ASCENDING, DESCENDING
 
Constructor Summary
UniqueArtifactIdConstraint(java.util.List<java.lang.String> selectedRepositoryIds, java.lang.String groupId)
          Obtain a set of unique ArtifactIds for the specified groupId.
UniqueArtifactIdConstraint(java.lang.String groupId)
          Obtain a set of unique ArtifactIds for the specified groupId.
UniqueArtifactIdConstraint(java.lang.String repoId, boolean isUnique)
          Obtain a set of unique artifactIds with respect to their groups from the specified repository.
 
Method Summary
 java.lang.String getCountSql()
           
 java.lang.Class getResultClass()
          For simple Constraints the results class must be specified.
 java.lang.String getSelectSql()
          Get the SELECT query value for the constraint.
 
Methods inherited from class org.apache.maven.archiva.database.constraints.AbstractSimpleConstraint
getFetchLimits, getParameters, isResultsPersistable
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.apache.maven.archiva.database.Constraint
getFetchLimits
 

Constructor Detail

UniqueArtifactIdConstraint

public UniqueArtifactIdConstraint(java.util.List<java.lang.String> selectedRepositoryIds,
                                  java.lang.String groupId)
Obtain a set of unique ArtifactIds for the specified groupId.

Parameters:
groupId - the groupId to search for artifactIds within.

UniqueArtifactIdConstraint

public UniqueArtifactIdConstraint(java.lang.String groupId)
Obtain a set of unique ArtifactIds for the specified groupId.

Parameters:
groupId - the groupId to search for artifactIds within.

UniqueArtifactIdConstraint

public UniqueArtifactIdConstraint(java.lang.String repoId,
                                  boolean isUnique)
Obtain a set of unique artifactIds with respect to their groups from the specified repository.

Parameters:
repoId -
isUnique -
Method Detail

getResultClass

public java.lang.Class getResultClass()
Description copied from interface: SimpleConstraint
For simple Constraints the results class must be specified.

Specified by:
getResultClass in interface SimpleConstraint
Returns:
the result class.

getSelectSql

public java.lang.String getSelectSql()
Description copied from interface: SimpleConstraint
Get the SELECT query value for the constraint.

Specified by:
getSelectSql in interface SimpleConstraint
Returns:
the SELECT value for this constraint. (can be null)

getCountSql

public java.lang.String getCountSql()
Specified by:
getCountSql in interface SimpleConstraint
Overrides:
getCountSql in class AbstractSimpleConstraint