public class ArtifactDefinitionHibernateDao extends BambooHibernateObjectDao<ArtifactDefinition> implements ArtifactDefinitionDao
Constructor and Description |
---|
ArtifactDefinitionHibernateDao() |
Modifier and Type | Method and Description |
---|---|
void |
delete(@NotNull ArtifactDefinition artifactDefinition)
Removes the given entity from the database
|
<E extends ArtifactDefinition> |
deleteAll(@NotNull Collection<E> entities)
Remove all elements in the collection from database
|
@NotNull Collection<? extends ArtifactDefinition> |
findAll()
Find all artifact definitions
|
@NotNull Collection<? extends ArtifactDefinition> |
findAll(int firstResult,
int maxResults) |
@Nullable ArtifactDefinition |
findById(long id)
Get artifact definition of specified id
|
@Nullable ArtifactDefinition |
findByName(@NotNull ImmutablePlan plan,
@NotNull String name)
Find artifact definition of a given name associated with a producer job.
|
@Nullable ArtifactDefinition |
findByNameInChain(@NotNull ImmutableChain chain,
@NotNull 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.
|
@NotNull List<ArtifactDefinition> |
findByProducer(@NotNull ImmutablePlan plan)
Get list of artifact definitions associated with a plan
|
@NotNull List<ArtifactDefinition> |
findSharedArtifactsByChain(@NotNull ImmutableChain chain)
Find all shared artifacts that exist for a particular chain.
|
@NotNull BambooEntityOid |
getMaxArtifactDefinitionOid(int serverKey)
Find maximum oid used by existing objects in the db.
|
void |
removeByProducer(@NotNull 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 @Nullable ArtifactDefinition findById(long id)
ArtifactDefinitionDao
findById
in interface ArtifactDefinitionDao
id
- id of artifact definition@Nullable public @Nullable ArtifactDefinition findByName(@NotNull @NotNull ImmutablePlan plan, @NotNull @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 @Nullable ArtifactDefinition findByNameInChain(@NotNull @NotNull ImmutableChain chain, @NotNull @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 @NotNull List<ArtifactDefinition> findSharedArtifactsByChain(@NotNull @NotNull ImmutableChain chain)
ArtifactDefinitionDao
findSharedArtifactsByChain
in interface ArtifactDefinitionDao
chain
- chain which associated artifact definitions should be retrieved@NotNull public @NotNull Collection<? extends ArtifactDefinition> findAll()
ArtifactDefinitionDao
findAll
in interface ArtifactDefinitionDao
@NotNull public @NotNull Collection<? extends ArtifactDefinition> findAll(int firstResult, int maxResults)
findAll
in interface ArtifactDefinitionDao
@NotNull public @NotNull List<ArtifactDefinition> findByProducer(@NotNull @NotNull ImmutablePlan plan)
ArtifactDefinitionDao
findByProducer
in interface ArtifactDefinitionDao
plan
- plan which associated artifact definitions should be retrievedpublic void delete(@NotNull @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 @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 @NotNull ImmutablePlan plan)
ArtifactDefinitionDao
removeByProducer
in interface ArtifactDefinitionDao
plan
- plan which associated artifact definitions should be removed@NotNull public @NotNull BambooEntityOid getMaxArtifactDefinitionOid(int serverKey)
ArtifactDefinitionDao
getMaxArtifactDefinitionOid
in interface ArtifactDefinitionDao
Copyright © 2022 Atlassian Software Systems Pty Ltd. All rights reserved.