public class ArtifactHibernateDao extends StatelessSessionHibernateDaoSupport implements ArtifactDao
| Constructor and Description | 
|---|
ArtifactHibernateDao(TransactionAndHibernateTemplate transactionTemplate)  | 
| Modifier and Type | Method and Description | 
|---|---|
List<MutableArtifact> | 
findAll()
Find all  
MutableArtifact | 
@NotNull Map<String,Long> | 
findArtifactUsedStorageByLinkType()
Find how much space artifacts use by link type, e.g. 
 | 
@Nullable MutableArtifact | 
findById(long id)
Find  
MutableArtifact by id. | 
List<MutableArtifact> | 
findOrphanedArtifacts()
Find all artifacts that are no longer referenced by any result or version. 
 | 
List<MutableArtifact> | 
findOrphanedArtifactsByIds(@NotNull List<Long> artifactIds)
Find all artifacts which id is on the list and that are no longer referenced by any result or version. 
 | 
List<MutableArtifact> | 
findPlanArtifactsReferencedByVersion(@NotNull PlanKey planKey)
Find all artifacts that belong to a plan are part of a deployment version. 
 | 
List<MutableArtifact> | 
findPlanResultArtifactsReferencedByVersion(@NotNull PlanResultKey planResultKey)
Find all artifacts that belong to a build result are part of a deployment version. 
 | 
boolean | 
isReferencedByVersion(long artifactId)  | 
void | 
removeAll(@NotNull Collection<MutableArtifact> artifacts)
Remove all artifacts in the collection 
 | 
void | 
removeById(long id)
Remove artifact. 
 | 
void | 
removeByPlanKey(@NotNull PlanKey planKey)
Remove all artifacts that belong to a plan and are not part of a deployment version. 
 | 
void | 
removeByPlanResultKey(@NotNull 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(@NotNull PlanKey originalPlanKey,
             @NotNull PlanKey newPlanKey)
Update planKey in Artifact entities when plan key has changed (ie after moving plan) 
 | 
getCacheAwareHibernateTemplatepublic ArtifactHibernateDao(TransactionAndHibernateTemplate transactionTemplate)
public void save(MutableArtifact artifact)
ArtifactDaosave in interface ArtifactDaopublic List<MutableArtifact> findAll()
ArtifactDaoMutableArtifactfindAll in interface ArtifactDao@Nullable public @Nullable MutableArtifact findById(long id)
ArtifactDaoMutableArtifact by id.findById in interface ArtifactDaopublic boolean isReferencedByVersion(long artifactId)
isReferencedByVersion in interface ArtifactDaopublic List<MutableArtifact> findPlanResultArtifactsReferencedByVersion(@NotNull @NotNull PlanResultKey planResultKey)
ArtifactDaofindPlanResultArtifactsReferencedByVersion in interface ArtifactDaopublic List<MutableArtifact> findPlanArtifactsReferencedByVersion(@NotNull @NotNull PlanKey planKey)
ArtifactDaofindPlanArtifactsReferencedByVersion in interface ArtifactDaopublic void removeById(long id)
ArtifactDaoremoveById in interface ArtifactDaopublic void removeByPlanKey(@NotNull
                            @NotNull PlanKey planKey)
ArtifactDaoremoveByPlanKey in interface ArtifactDaopublic void removeByPlanResultKey(@NotNull
                                  @NotNull PlanResultKey planResultKey)
ArtifactDaoremoveByPlanResultKey in interface ArtifactDaopublic List<MutableArtifact> findOrphanedArtifacts()
ArtifactDaofindOrphanedArtifacts in interface ArtifactDaopublic List<MutableArtifact> findOrphanedArtifactsByIds(@NotNull @NotNull List<Long> artifactIds)
ArtifactDaofindOrphanedArtifactsByIds in interface ArtifactDaopublic void removeAll(@NotNull
                      @NotNull Collection<MutableArtifact> artifacts)
ArtifactDaoremoveAll in interface ArtifactDaopublic void updatePlanKey(@NotNull
                          @NotNull PlanKey originalPlanKey,
                          @NotNull
                          @NotNull PlanKey newPlanKey)
ArtifactDaoupdatePlanKey in interface ArtifactDaooriginalPlanKey - original PlanKeynewPlanKey - new PlanKey@NotNull public @NotNull Map<String,Long> findArtifactUsedStorageByLinkType()
ArtifactDaofindArtifactUsedStorageByLinkType in interface ArtifactDaoCopyright © 2024 Atlassian Software Systems Pty Ltd. All rights reserved.