|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.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 | |
---|---|
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 |
deleteVersionStatus(long deploymentVersionId)
Delete DeploymentVersionStatus records related to a given version |
int |
deleteVersionStatuses(DeploymentVersionDeletionAdapter deletionAdapter)
Delete DeploymentVersionStatus records related to a given versions |
MutableDeploymentVersion |
findLatestVersion(long deploymentProjectId)
Find the latest version created for this 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.lang.Iterable<MutableDeploymentVersion> |
findVersionsBetween(long deploymentProjectId,
long version1Id,
long version2Id)
Find versions created between version1 and version2. |
java.util.List<MutableDeploymentVersion> |
findVersionsWithNameLike(long deploymentProjectId,
java.lang.String name)
Search for version in a project by name. |
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 |
MutableDeploymentVersion |
getLatestVersionForProject(long id)
Find the latest version for a deployment project. |
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. |
int |
getVersionsCountForProject(long deploymentProjectId)
|
java.util.List<MutableDeploymentVersionStatus> |
getVersionStatuses(long deploymentVersionId)
Get MutableDeploymentVersionStatus es by DeploymentVersion id |
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) |
MutableDeploymentVersionStatus |
updateVersionStatus(long deploymentVersionId,
DeploymentVersionState state,
java.lang.String userName)
|
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 |
---|
@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
@NotNull public java.util.List<MutableDeploymentVersion> findVersionsWithNameLike(long deploymentProjectId, @NotNull java.lang.String name)
DeploymentVersionDao
findVersionsWithNameLike
in interface DeploymentVersionDao
deploymentProjectId
- deployment project to get versions ofname
- to compare version name to. Should already contain %'s for matching
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 findLatestVersion(long deploymentProjectId)
DeploymentVersionDao
findLatestVersion
in interface DeploymentVersionDao
@NotNull public java.util.Set<PlanResultKey> getRelatedPlanResultKeys(long deploymentVersionId)
getRelatedPlanResultKeys
in interface DeploymentVersionDao
public MutableDeploymentVersionStatus getLatestVersionStatus(long deploymentVersionId)
getLatestVersionStatus
in interface DeploymentVersionDao
public MutableDeploymentVersionStatus updateVersionStatus(long deploymentVersionId, DeploymentVersionState state, java.lang.String userName)
updateVersionStatus
in interface DeploymentVersionDao
public MutableDeploymentVersion getLatestVersionForProject(long id)
DeploymentVersionDao
getLatestVersionForProject
in interface DeploymentVersionDao
id
- of the deployment project
@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
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 getVersionsCountForProject(long deploymentProjectId)
getVersionsCountForProject
in interface DeploymentVersionDao
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 |