com.atlassian.bamboo.artifact
Interface ArtifactDao

All Known Implementing Classes:
ArtifactHibernateDao

public interface ArtifactDao


Method Summary
 java.util.List<MutableArtifact> findAll()
          Find all MutableArtifact
 MutableArtifact findById(long id)
          Find MutableArtifact by id.
 java.util.List<MutableArtifact> findOrphanedArtifacts()
          Find all artifacts that are no longer referenced by any result or version.
 java.util.List<MutableArtifact> findPlanArtifactsReferencedByVersion(PlanKey planKey)
          Find all artifacts that belong to a plan are part of a deployment version.
 java.util.List<MutableArtifact> findPlanResultArtifactsReferencedByVersion(PlanResultKey planResultKey)
          Find all artifacts that belong to a build result are part of a deployment version.
 boolean isReferencedByVersion(long artifactId)
           
 void removeAll(java.util.Collection<MutableArtifact> artifacts)
          Remove all artifacts in the collection
 void removeById(long id)
          Remove artifact.
 void removeByPlanKey(PlanKey planKey)
          Remove all artifacts that belong to a plan and are not part of a deployment version.
 void removeByPlanResultKey(PlanResultKey planResultKey)
          Remove all artifacts that belong to a build result and are not part of a deployment version.
 void save(MutableArtifact artifact)
          Save artifact.
 void updatePlanKey(PlanKey originalPlanKey, PlanKey newPlanKey)
          Update planKey in Artifact entities when plan key has changed (ie after moving plan)
 

Method Detail

save

void save(MutableArtifact artifact)
Save artifact.

Parameters:
artifact -

findAll

java.util.List<MutableArtifact> findAll()
Find all MutableArtifact

Returns:

findById

@Nullable
MutableArtifact findById(long id)
Find MutableArtifact by id.

Parameters:
id -
Returns:

isReferencedByVersion

boolean isReferencedByVersion(long artifactId)
Parameters:
artifactId -
Returns:
true iff artifact is a part of a deployment verison

findPlanResultArtifactsReferencedByVersion

java.util.List<MutableArtifact> findPlanResultArtifactsReferencedByVersion(@NotNull
                                                                           PlanResultKey planResultKey)
Find all artifacts that belong to a build result are part of a deployment version.

Parameters:
planResultKey -
Returns:

findPlanArtifactsReferencedByVersion

java.util.List<MutableArtifact> findPlanArtifactsReferencedByVersion(@NotNull
                                                                     PlanKey planKey)
Find all artifacts that belong to a plan are part of a deployment version.

Parameters:
planKey -
Returns:

removeById

void removeById(long id)
Remove artifact.

Parameters:
id -

removeByPlanKey

void removeByPlanKey(@NotNull
                     PlanKey planKey)
Remove all artifacts that belong to a plan and are not part of a deployment version.

Parameters:
planKey -

removeByPlanResultKey

void removeByPlanResultKey(@NotNull
                           PlanResultKey planResultKey)
Remove all artifacts that belong to a build result and are not part of a deployment version.

Parameters:
planResultKey -

findOrphanedArtifacts

java.util.List<MutableArtifact> findOrphanedArtifacts()
Find all artifacts that are no longer referenced by any result or version.

Returns:

removeAll

void removeAll(@NotNull
               java.util.Collection<MutableArtifact> artifacts)
Remove all artifacts in the collection


updatePlanKey

void updatePlanKey(@NotNull
                   PlanKey originalPlanKey,
                   @NotNull
                   PlanKey newPlanKey)
Update planKey in Artifact entities when plan key has changed (ie after moving plan)

Parameters:
originalPlanKey - original PlanKey
newPlanKey - new PlanKey


Copyright © 2013 Atlassian Software Systems Pty Ltd. All Rights Reserved.