public class DeploymentProjectDaoImpl extends StatelessSessionHibernateDaoSupport implements DeploymentProjectDao
Constructor and Description |
---|
DeploymentProjectDaoImpl() |
Modifier and Type | Method and Description |
---|---|
long |
countAllDeploymentProjects() |
@NotNull MutableDeploymentProject |
createNewDeploymentProjectInstance() |
@NotNull MutableVersionNamingScheme |
createNewVersionNamingSchemeInstance() |
void |
delete(MutableDeploymentProject deploymentProject)
Delete DeploymentProject and related DeploymentProjectItems
|
void |
delete(MutableDeploymentProjectItem deploymentProjectItem)
Delete DeploymentProjectItem
|
void |
delete(MutableVersionNamingScheme versionNamingScheme)
Delete the version naming Scheme
|
boolean |
doesArtifactProjectItemExist(long deploymentProjectId,
long artifactId)
Check for existence of DeploymentProjectItem by DB id of the DeploymentProject and ArtifactDefinition
|
List<MutableDeploymentProject> |
findAllByIds(@NotNull Collection<Long> ids)
Returns a list of Deployment Projects which id values are in the deploymentsIds collection
|
@Nullable MutableDeploymentProject |
findDeploymentProjectByName(String name) |
@Nullable MutableDeploymentProject |
findDeploymentProjectByOid(BambooEntityOid oid) |
@NotNull Collection<Long> |
findDeploymentProjectsInOtherStates(VcsLocationBambooSpecsState specsState) |
@NotNull List<MutableDeploymentProject> |
findDeploymentProjectsRelatedToArtifact(long artifactId) |
@NotNull Set<Long> |
findSpecsStateIdsReferencedByDeployments() |
@NotNull List<MutableDeploymentProject> |
getAllDeploymentProjects() |
@NotNull List<MutableDeploymentProject> |
getAllDeploymentProjects(int firstResult,
int maxResults) |
@Nullable MutableDeploymentProjectItem |
getArtifactProjectItem(long deploymentProjectId,
long artifactId)
Get DeploymentProjectItem by DB id of the DeploymentProject and ArtifactDefinition
|
@Nullable MutableDeploymentProject |
getDeploymentProject(@NotNull DeploymentKey key)
Get DeploymentProject by key
|
MutableDeploymentProject |
getDeploymentProject(long deploymentProjectId)
Get DeploymentProject by DB id
|
int |
getDeploymentProjectCount() |
@Nullable MutableDeploymentProject |
getDeploymentProjectForEnvironment(long environmentId)
Get DeploymentProject associated with Environment
|
@Nullable MutableDeploymentProject |
getDeploymentProjectForVersion(long versionId)
Get DeploymentProject associated with Version
|
List<MutableDeploymentProject> |
getDeploymentProjectsReferencingArtifact(long artifactId)
Get all deployment projects that contain a version that uses specified artifact
|
@NotNull List<MutableDeploymentProject> |
getDeploymentProjectsRelatedToPlan(@NotNull PlanKey planKey)
Get DeploymentProjects linked to Plan with planKey.
|
@NotNull List<MutableDeploymentProject> |
getDeploymentProjectsRelatedToPlans(@NotNull Set<PlanKey> planKeyFamily)
Get DeploymentProjects linked to Plan identified with any of plan keys.
|
@NotNull BambooEntityOid |
getMaxDeploymentProjectOid(int serverKey) |
List<Pair<MutableDeploymentProject,MutableEnvironment>> |
getPaginatedDeploymentsWithEnvironments(int start,
int limit,
String filter)
Retrieves paginated list of pairs of MutableDeploymentProject and MutableEnvironment ordered by
InternalDeploymentProject.getName() and InternalEnvironment.getPosition() |
List<Pair<Long,Long>> |
getPaginatedDeploymentsWithEnvironmentsOnlyIds(int start,
int limit,
String filter)
Retrieves paginated list of pairs of MutableDeploymentProject.id and MutableEnvironment.id ordered by
InternalDeploymentProject.getName() and InternalEnvironment.getPosition() . |
MutableDeploymentProjectItem |
getProjectItem(long deploymentProjectItemId)
Get DeploymentProjectItem by DB id
|
@NotNull List<MutableDeploymentProjectItem> |
getProjectItems(long deploymentProjectId)
Get list of DeploymentProject items
|
@Nullable MutableVersionNamingScheme |
getVersionNamingSchemeForProject(long deploymentProjectId)
Get the version naming configuration for a specific project
|
boolean |
isDeploymentProjectNameConflicting(@NotNull String name)
Deployment Project Names need to be unique within the system.
|
void |
removeAbstractProjectItems() |
void |
save(@NotNull MutableDeploymentProject deploymentProject)
Save DeploymentProject
|
void |
save(MutableDeploymentProjectItem deploymentProjectItem)
Save DeploymentProjectItem
|
void |
save(MutableVersionNamingScheme versionNamingScheme)
Save the version naming Scheme
|
getCacheAwareHibernateTemplate
public long countAllDeploymentProjects()
countAllDeploymentProjects
in interface DeploymentProjectDao
@NotNull public @NotNull List<MutableDeploymentProject> getAllDeploymentProjects()
getAllDeploymentProjects
in interface DeploymentProjectDao
@NotNull public @NotNull List<MutableDeploymentProject> getAllDeploymentProjects(int firstResult, int maxResults)
getAllDeploymentProjects
in interface DeploymentProjectDao
firstResult
starts from 0@NotNull public @NotNull List<MutableDeploymentProject> getDeploymentProjectsRelatedToPlan(@NotNull @NotNull PlanKey planKey)
DeploymentProjectDao
getDeploymentProjectsRelatedToPlan
in interface DeploymentProjectDao
planKey
- of the linked Plan@NotNull public @NotNull List<MutableDeploymentProject> getDeploymentProjectsRelatedToPlans(@NotNull @NotNull Set<PlanKey> planKeyFamily)
DeploymentProjectDao
getDeploymentProjectsRelatedToPlans
in interface DeploymentProjectDao
planKeyFamily
- set of plan keys, usually it is set of all branch keys + master plan key@NotNull public @NotNull List<MutableDeploymentProject> findDeploymentProjectsRelatedToArtifact(long artifactId)
findDeploymentProjectsRelatedToArtifact
in interface DeploymentProjectDao
public void save(@NotNull @NotNull MutableDeploymentProject deploymentProject)
DeploymentProjectDao
save
in interface DeploymentProjectDao
public MutableDeploymentProject getDeploymentProject(long deploymentProjectId)
DeploymentProjectDao
getDeploymentProject
in interface DeploymentProjectDao
@Nullable public @Nullable MutableDeploymentProject getDeploymentProject(@NotNull @NotNull DeploymentKey key)
DeploymentProjectDao
getDeploymentProject
in interface DeploymentProjectDao
@Nullable public @Nullable MutableDeploymentProject getDeploymentProjectForEnvironment(long environmentId)
DeploymentProjectDao
getDeploymentProjectForEnvironment
in interface DeploymentProjectDao
environmentId
- Environment id@Nullable public @Nullable MutableDeploymentProject getDeploymentProjectForVersion(long versionId)
DeploymentProjectDao
getDeploymentProjectForVersion
in interface DeploymentProjectDao
versionId
- Version idpublic boolean isDeploymentProjectNameConflicting(@NotNull @NotNull String name)
DeploymentProjectDao
isDeploymentProjectNameConflicting
in interface DeploymentProjectDao
name
- to check@Nullable public @Nullable MutableDeploymentProject findDeploymentProjectByOid(BambooEntityOid oid)
findDeploymentProjectByOid
in interface DeploymentProjectDao
@Nullable public @Nullable MutableDeploymentProject findDeploymentProjectByName(String name)
findDeploymentProjectByName
in interface DeploymentProjectDao
@NotNull public @NotNull List<MutableDeploymentProjectItem> getProjectItems(long deploymentProjectId)
DeploymentProjectDao
getProjectItems
in interface DeploymentProjectDao
public MutableDeploymentProjectItem getProjectItem(long deploymentProjectItemId)
DeploymentProjectDao
getProjectItem
in interface DeploymentProjectDao
@Nullable public @Nullable MutableDeploymentProjectItem getArtifactProjectItem(long deploymentProjectId, long artifactId)
DeploymentProjectDao
getArtifactProjectItem
in interface DeploymentProjectDao
public boolean doesArtifactProjectItemExist(long deploymentProjectId, long artifactId)
DeploymentProjectDao
doesArtifactProjectItemExist
in interface DeploymentProjectDao
public void save(MutableDeploymentProjectItem deploymentProjectItem)
DeploymentProjectDao
save
in interface DeploymentProjectDao
public void delete(MutableDeploymentProjectItem deploymentProjectItem)
DeploymentProjectDao
delete
in interface DeploymentProjectDao
public void delete(MutableDeploymentProject deploymentProject)
DeploymentProjectDao
delete
in interface DeploymentProjectDao
@Nullable public @Nullable MutableVersionNamingScheme getVersionNamingSchemeForProject(long deploymentProjectId)
DeploymentProjectDao
getVersionNamingSchemeForProject
in interface DeploymentProjectDao
deploymentProjectId
- of the projectpublic void save(MutableVersionNamingScheme versionNamingScheme)
DeploymentProjectDao
save
in interface DeploymentProjectDao
versionNamingScheme
- to savepublic void delete(MutableVersionNamingScheme versionNamingScheme)
DeploymentProjectDao
delete
in interface DeploymentProjectDao
versionNamingScheme
- to deletepublic int getDeploymentProjectCount()
getDeploymentProjectCount
in interface DeploymentProjectDao
public List<MutableDeploymentProject> getDeploymentProjectsReferencingArtifact(long artifactId)
DeploymentProjectDao
getDeploymentProjectsReferencingArtifact
in interface DeploymentProjectDao
@NotNull public @NotNull BambooEntityOid getMaxDeploymentProjectOid(int serverKey)
getMaxDeploymentProjectOid
in interface DeploymentProjectDao
@NotNull public @NotNull MutableDeploymentProject createNewDeploymentProjectInstance()
createNewDeploymentProjectInstance
in interface DeploymentProjectDao
@NotNull public @NotNull MutableVersionNamingScheme createNewVersionNamingSchemeInstance()
createNewVersionNamingSchemeInstance
in interface DeploymentProjectDao
@NotNull public @NotNull Collection<Long> findDeploymentProjectsInOtherStates(VcsLocationBambooSpecsState specsState)
findDeploymentProjectsInOtherStates
in interface DeploymentProjectDao
@NotNull public @NotNull Set<Long> findSpecsStateIdsReferencedByDeployments()
findSpecsStateIdsReferencedByDeployments
in interface DeploymentProjectDao
public void removeAbstractProjectItems()
removeAbstractProjectItems
in interface DeploymentProjectDao
public List<Pair<MutableDeploymentProject,MutableEnvironment>> getPaginatedDeploymentsWithEnvironments(int start, int limit, String filter)
DeploymentProjectDao
InternalDeploymentProject.getName()
and InternalEnvironment.getPosition()
getPaginatedDeploymentsWithEnvironments
in interface DeploymentProjectDao
public List<Pair<Long,Long>> getPaginatedDeploymentsWithEnvironmentsOnlyIds(int start, int limit, String filter)
DeploymentProjectDao
InternalDeploymentProject.getName()
and InternalEnvironment.getPosition()
.
If DeploymentProject has 0 Environments then there will be one pair with DeploymentProject id and second value as a null.getPaginatedDeploymentsWithEnvironmentsOnlyIds
in interface DeploymentProjectDao
public List<MutableDeploymentProject> findAllByIds(@NotNull @NotNull Collection<Long> ids)
DeploymentProjectDao
findAllByIds
in interface DeploymentProjectDao
ids
- list of id valuesCopyright © 2022 Atlassian Software Systems Pty Ltd. All rights reserved.