public class ArtifactDefinitionHibernateDao extends BambooHibernateObjectDao<ArtifactDefinition> implements ArtifactDefinitionDao
Constructor and Description |
---|
ArtifactDefinitionHibernateDao() |
Modifier and Type | Method and Description |
---|---|
void |
delete(ArtifactDefinition artifactDefinition)
Removes the given entity from the database
|
<E extends ArtifactDefinition> |
deleteAll(Collection<E> entities)
Remove all elements in the collection from database
|
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(ImmutablePlan plan)
Remove all artifact definitions associated with a plan.
|
countAll, countWithRestriction, 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, 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 delete(@NotNull ArtifactDefinition artifactDefinition)
BambooObjectDao
delete
in interface BambooObjectDao<ArtifactDefinition>
delete
in class BambooHibernateObjectDao<ArtifactDefinition>
artifactDefinition
- entity to be removedpublic <E extends ArtifactDefinition> void deleteAll(@NotNull Collection<E> entities)
BambooObjectDao
deleteAll
in interface BambooObjectDao<ArtifactDefinition>
deleteAll
in class BambooHibernateObjectDao<ArtifactDefinition>
entities
- elements to be removed from databasepublic void removeByProducer(@NotNull ImmutablePlan 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 © 2021 Atlassian Software Systems Pty Ltd. All rights reserved.