public class ArtifactDefinitionHibernateDao extends BambooHibernateObjectDao<ArtifactDefinition> implements ArtifactDefinitionDao
Constructor and Description |
---|
ArtifactDefinitionHibernateDao() |
Modifier and Type | Method and Description |
---|---|
Collection<? extends ArtifactDefinition> |
findAll()
Find all artifact definitions
|
ArtifactDefinition |
findById(long id)
Get artifact definition of specified id
|
ArtifactDefinition |
findByName(ImmutablePlan plan,
String name)
Find artifact definition of a given name associated with a producer job.
|
ArtifactDefinition |
findByNameInChain(ImmutableChain chain,
String name)
Find artifact definition of a given name which has sharedArtifact property set to true,
associated with a producer job that belongs to the chain.
|
List<ArtifactDefinition> |
findByProducer(ImmutablePlan plan)
Get list of artifact definitions associated with a plan
|
List<ArtifactDefinition> |
findSharedArtifactsByChain(ImmutableChain chain)
Find all shared artifacts that exist for a particular chain.
|
void |
removeByProducer(Plan plan)
Remove all artifact definitions associated with a plan.
|
countAll, countWithRestriction, delete, deleteAll, execute, executeCountQuery, executeReturnInt, executeReturnLong, findAll, findById, save, saveAll
getCacheAwareHibernateTemplate
checkDaoConfig, convertHibernateAccessException, createHibernateTemplate, getHibernateTemplate, getSession, getSession, getSessionFactory, releaseSession, setHibernateTemplate, setSessionFactory
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
countAll, countWithRestriction, delete, deleteAll, executeReturnInt, executeReturnLong, findAll, findById, save, saveAll
@Nullable public ArtifactDefinition findById(long id)
ArtifactDefinitionDao
findById
in interface ArtifactDefinitionDao
id
- id of artifact definition@Nullable public ArtifactDefinition findByName(@NotNull ImmutablePlan plan, @NotNull String name)
ArtifactDefinitionDao
findByName
in interface ArtifactDefinitionDao
plan
- plan which associated artifact definition should be retrievedname
- name to search among plan's artifact definitions@Nullable public ArtifactDefinition findByNameInChain(@NotNull ImmutableChain chain, @NotNull String name)
ArtifactDefinitionDao
findByNameInChain
in interface ArtifactDefinitionDao
chain
- chain which associated artifact definition should be retrievedname
- name to search among plan's artifact definitions@NotNull public List<ArtifactDefinition> findSharedArtifactsByChain(@NotNull ImmutableChain chain)
ArtifactDefinitionDao
findSharedArtifactsByChain
in interface ArtifactDefinitionDao
chain
- chain which associated artifact definitions should be retrieved@NotNull public Collection<? extends ArtifactDefinition> findAll()
ArtifactDefinitionDao
findAll
in interface ArtifactDefinitionDao
@NotNull public List<ArtifactDefinition> findByProducer(@NotNull ImmutablePlan plan)
ArtifactDefinitionDao
findByProducer
in interface ArtifactDefinitionDao
plan
- plan which associated artifact definitions should be retrievedpublic void removeByProducer(@NotNull Plan plan)
ArtifactDefinitionDao
removeByProducer
in interface ArtifactDefinitionDao
plan
- plan which associated artifact definitions should be removedCopyright © 2016 Atlassian Software Systems Pty Ltd. All rights reserved.