|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.springframework.dao.support.DaoSupport
org.springframework.orm.hibernate.support.HibernateDaoSupport
com.atlassian.bamboo.persistence3.StatelessSessionHibernateDaoSupport
com.atlassian.bamboo.deployments.versions.persistence.DeploymentVersionDaoImpl
public class DeploymentVersionDaoImpl
Field Summary |
---|
Fields inherited from class org.springframework.dao.support.DaoSupport |
---|
logger |
Constructor Summary | |
---|---|
DeploymentVersionDaoImpl()
|
Method Summary | |
---|---|
MutableDeploymentVersionStatus |
createNewVersionStatus(long deploymentVersionId,
DeploymentVersionState state,
java.lang.String userName)
Creates a new vesion status for the given deployment version. |
void |
delete(MutableDeploymentVersion deploymentVersion)
Delete MutableDeploymentVersion |
int |
deleteForDeploymentProject(long deploymentProjectId)
Affected tables: - DEPLOYMENT_VERSION (manual, JDBC) - DEPLOYMENT_VERSION_ITEM (manual, JDBC) - DEPLOYMENT_VERSION_ITEM_BA (manual, JDBC) - DEPLOYMENT_PLANRESULTKEYS (manual, JDBC) |
int |
deleteVersionItems(long deploymentVersionId)
Affected tables: - DEPLOYMENT_VERSION_ITEM (manual, JDBC) - DEPLOYMENT_VERSION_ITEM_BA (manual, JDBC) |
int |
deleteVersionStatus(long deploymentVersionId)
Delete DeploymentVersionStatus records related to a given version |
int |
deleteVersionStatuses(DeploymentVersionDeletionAdapter deletionAdapter)
Delete DeploymentVersionStatus records related to a given versions |
java.util.List<MutableDeploymentVersion> |
findLatestKnownVersionsForEnvironmentsOfDeploymentProject(long deploymentProjectId)
Find all the versions that are currently deployed on environments of a deployment projects. |
MutableDeploymentVersion |
findLatestVersionForProject(long deploymentProjectId)
Find the latest version for a deployment project. |
MutableDeploymentVersion |
findLatestVersionForProject(long deploymentProjectId,
PlanKey branchKey)
Find the latest version for a deployment project. |
MutableDeploymentVersion |
findNextVersionContainingResult(long deploymentProjectId,
PlanResultKey planResultKey)
Find the first version that is created from a result which is later than current result (not taking custom revision into account) |
MutableDeploymentVersion |
findPreviousVersion(long deploymentProjectId,
MutableDeploymentVersion deploymentVersion)
Find the last version created before this one. |
java.util.List<MutableDeploymentVersion> |
findVersions(DeploymentVersionSearchCriteria searchCriteria)
Search for versions using search criteria |
java.util.List<MutableDeploymentVersion> |
findVersionsAssociatedWithJiraIssue(long deploymentProjectId,
java.lang.String issueKey)
Find all the versions of a DeploymentProject that are associated with a JIRA issue |
java.util.List<MutableDeploymentVersion> |
findVersionsAssociatedWithJiraIssue(java.lang.String issueKey)
Find all the versions that are associated with a JIRA issue |
java.lang.Iterable<MutableDeploymentVersion> |
findVersionsBetween(long deploymentProjectId,
long version1Id,
long version2Id)
Find versions created between version1 and version2. |
MutableDeploymentVersion |
getDeploymentVersion(long deploymentVersionId)
Get MutableDeploymentVersion by id |
MutableDeploymentVersion |
getDeploymentVersionByName(java.lang.String existingVersionName,
long deploymentProjectId)
Retrieve a specific version by name for a project |
java.util.List<MutableDeploymentVersion> |
getDeploymentVersionsForDeploymentProject(long deploymentProjectId)
Get MutableDeploymentVersion by DeploymentProject id |
MutableDeploymentVersionStatus |
getLatestVersionStatus(long deploymentVersionId)
|
java.util.Set<PlanResultKey> |
getRelatedPlanResultKeys(long deploymentVersionId)
|
MutableDeploymentVersion |
getRelatedVersion(long deploymentProjectId,
PlanResultKey planResultKey)
Find latest version of a deployment project that is related to specific plan result. |
java.util.List<java.lang.String> |
getResultPlanKeysHavingDeploymentProjectVersions(long deploymentProjectId)
Returns keys of result plans (branch) that have at least one deployment project version (release) |
int |
getVersionsCount()
Count all versions |
int |
getVersionsCountForProject(long deploymentProjectId)
Count versions related to deployment project |
java.util.List<MutableDeploymentVersionStatus> |
getVersionStatuses(long deploymentVersionId)
Get MutableDeploymentVersionStatus es by DeploymentVersion id |
boolean |
hasVersions(DeploymentVersionSearchCriteria searchCriteria)
Test if versions that match criteria do exist |
boolean |
isVersionNameConflicting(java.lang.String name,
long deploymentProjectId)
Check whether the version name is already being used by another version within this project |
void |
save(MutableDeploymentVersion deploymentVersion)
MutableDeploymentVersionItem members of MutableDeploymentVersion.getItems() are persisted in a cascade |
void |
updatePlanKey(PlanKey originalPlanKey,
PlanKey newPlanKey)
Update planKey in DeploymentVersion's related entities when plan key has changed (ie after moving plan) |
Methods inherited from class com.atlassian.bamboo.persistence3.StatelessSessionHibernateDaoSupport |
---|
getCacheAwareHibernateTemplate |
Methods inherited from class org.springframework.orm.hibernate.support.HibernateDaoSupport |
---|
checkDaoConfig, convertHibernateAccessException, createHibernateTemplate, getHibernateTemplate, getSession, getSession, getSessionFactory, releaseSession, setHibernateTemplate, setSessionFactory |
Methods inherited from class org.springframework.dao.support.DaoSupport |
---|
afterPropertiesSet, initDao |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DeploymentVersionDaoImpl()
Method Detail |
---|
public java.util.List<java.lang.String> getResultPlanKeysHavingDeploymentProjectVersions(long deploymentProjectId)
DeploymentVersionDao
getResultPlanKeysHavingDeploymentProjectVersions
in interface DeploymentVersionDao
deploymentProjectId
- id of the deployment project
@NotNull public java.util.List<MutableDeploymentVersion> getDeploymentVersionsForDeploymentProject(long deploymentProjectId)
DeploymentVersionDao
getDeploymentVersionsForDeploymentProject
in interface DeploymentVersionDao
public MutableDeploymentVersion getDeploymentVersion(long deploymentVersionId)
DeploymentVersionDao
getDeploymentVersion
in interface DeploymentVersionDao
public void save(@NotNull MutableDeploymentVersion deploymentVersion)
MutableDeploymentVersion.getItems()
are persisted in a cascade
save
in interface DeploymentVersionDao
deploymentVersion
- MutableDeploymentVersion to be persistedpublic void delete(MutableDeploymentVersion deploymentVersion)
DeploymentVersionDao
delete
in interface DeploymentVersionDao
public int deleteForDeploymentProject(long deploymentProjectId)
deleteForDeploymentProject
in interface DeploymentVersionDao
deploymentProjectId
- id of DeploymentProject
public int deleteVersionItems(long deploymentVersionId)
deleteVersionItems
in interface DeploymentVersionDao
deploymentVersionId
- id of DeploymentVersion
@NotNull public java.util.List<MutableDeploymentVersion> findVersions(@NotNull DeploymentVersionSearchCriteria searchCriteria)
DeploymentVersionDao
findVersions
in interface DeploymentVersionDao
searchCriteria
- search criteria
public boolean hasVersions(@NotNull DeploymentVersionSearchCriteria searchCriteria)
DeploymentVersionDao
hasVersions
in interface DeploymentVersionDao
searchCriteria
- search criteria
public boolean isVersionNameConflicting(@NotNull java.lang.String name, long deploymentProjectId)
DeploymentVersionDao
isVersionNameConflicting
in interface DeploymentVersionDao
name
- to checkdeploymentProjectId
- project to filter by
@Nullable public MutableDeploymentVersion getDeploymentVersionByName(@NotNull java.lang.String existingVersionName, long deploymentProjectId)
DeploymentVersionDao
getDeploymentVersionByName
in interface DeploymentVersionDao
existingVersionName
- name of version to finddeploymentProjectId
- of project to look in
@Nullable public MutableDeploymentVersion findPreviousVersion(long deploymentProjectId, @NotNull MutableDeploymentVersion deploymentVersion)
DeploymentVersionDao
findPreviousVersion
in interface DeploymentVersionDao
@Nullable public MutableDeploymentVersion findLatestVersionForProject(long deploymentProjectId)
DeploymentVersionDao
findLatestVersionForProject
in interface DeploymentVersionDao
deploymentProjectId
- id of the deployment project
@Nullable public MutableDeploymentVersion findLatestVersionForProject(long deploymentProjectId, @NotNull PlanKey branchKey)
DeploymentVersionDao
findLatestVersionForProject
in interface DeploymentVersionDao
deploymentProjectId
- id of the deployment projectbranchKey
- key of the PlanBranch
@NotNull public java.util.Set<PlanResultKey> getRelatedPlanResultKeys(long deploymentVersionId)
getRelatedPlanResultKeys
in interface DeploymentVersionDao
@Nullable public MutableDeploymentVersionStatus getLatestVersionStatus(long deploymentVersionId)
getLatestVersionStatus
in interface DeploymentVersionDao
@NotNull public MutableDeploymentVersionStatus createNewVersionStatus(long deploymentVersionId, DeploymentVersionState state, @NotNull java.lang.String userName)
DeploymentVersionDao
createNewVersionStatus
in interface DeploymentVersionDao
@Nullable public MutableDeploymentVersion getRelatedVersion(long deploymentProjectId, @NotNull PlanResultKey planResultKey)
DeploymentVersionDao
getRelatedVersion
in interface DeploymentVersionDao
public MutableDeploymentVersion findNextVersionContainingResult(long deploymentProjectId, @NotNull PlanResultKey planResultKey)
DeploymentVersionDao
findNextVersionContainingResult
in interface DeploymentVersionDao
@NotNull public java.util.List<MutableDeploymentVersionStatus> getVersionStatuses(long deploymentVersionId)
DeploymentVersionDao
MutableDeploymentVersionStatus
es by DeploymentVersion id
getVersionStatuses
in interface DeploymentVersionDao
public java.lang.Iterable<MutableDeploymentVersion> findVersionsBetween(long deploymentProjectId, long version1Id, long version2Id)
DeploymentVersionDao
findVersionsBetween
in interface DeploymentVersionDao
@NotNull public java.util.List<MutableDeploymentVersion> findVersionsAssociatedWithJiraIssue(long deploymentProjectId, @NotNull java.lang.String issueKey)
DeploymentVersionDao
DeploymentProject
that are associated with a JIRA issue
findVersionsAssociatedWithJiraIssue
in interface DeploymentVersionDao
@NotNull public java.util.List<MutableDeploymentVersion> findVersionsAssociatedWithJiraIssue(@NotNull java.lang.String issueKey)
DeploymentVersionDao
findVersionsAssociatedWithJiraIssue
in interface DeploymentVersionDao
public java.util.List<MutableDeploymentVersion> findLatestKnownVersionsForEnvironmentsOfDeploymentProject(long deploymentProjectId)
DeploymentVersionDao
findLatestKnownVersionsForEnvironmentsOfDeploymentProject
in interface DeploymentVersionDao
public int deleteVersionStatus(long deploymentVersionId)
DeploymentVersionDao
deleteVersionStatus
in interface DeploymentVersionDao
deploymentVersionId
- id of the DeploymentVersion
public int deleteVersionStatuses(@NotNull DeploymentVersionDeletionAdapter deletionAdapter)
DeploymentVersionDao
deleteVersionStatuses
in interface DeploymentVersionDao
deletionAdapter
- DeletionSQLAdapter.getInClause()
should provide range of DeploymentVersions to remove
public int getVersionsCount()
DeploymentVersionDao
getVersionsCount
in interface DeploymentVersionDao
public int getVersionsCountForProject(long deploymentProjectId)
DeploymentVersionDao
getVersionsCountForProject
in interface DeploymentVersionDao
deploymentProjectId
- id of deployment project
public void updatePlanKey(@NotNull PlanKey originalPlanKey, @NotNull PlanKey newPlanKey)
DeploymentVersionDao
updatePlanKey
in interface DeploymentVersionDao
originalPlanKey
- original PlanKeynewPlanKey
- new PlanKey
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |