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
|
Collection<? extends ArtifactDefinition> |
findAll(int firstResult,
int maxResults) |
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.
|
BambooEntityOid |
getMaxArtifactDefinitionOid(int serverKey)
Find maximum oid used by existing objects in the db.
|
void |
removeByProducer(Plan plan)
Remove all artifact definitions associated with a plan.
|
countAll, countWithRestriction, delete, deleteAll, executeCountQuery, findAll, findById, merge, save, saveAll
getCacheAwareHibernateTemplate
checkDaoConfig, createHibernateTemplate, currentSession, getHibernateTemplate, getSessionFactory, setHibernateTemplate, setSessionFactory
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
countAll, countWithRestriction, delete, deleteAll, findAll, findById, merge, 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 Collection<? extends ArtifactDefinition> findAll(int firstResult, int maxResults)
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 removed@NotNull public BambooEntityOid getMaxArtifactDefinitionOid(int serverKey)
ArtifactDefinitionDao
getMaxArtifactDefinitionOid
in interface ArtifactDefinitionDao
Copyright © 2017 Atlassian Software Systems Pty Ltd. All rights reserved.