com.atlassian.bamboo.deployments.projects.persistence
Class DeploymentProjectDaoImpl

java.lang.Object
  extended by org.springframework.dao.support.DaoSupport
      extended by org.springframework.orm.hibernate.support.HibernateDaoSupport
          extended by com.atlassian.bamboo.persistence3.StatelessSessionHibernateDaoSupport
              extended by com.atlassian.bamboo.deployments.projects.persistence.DeploymentProjectDaoImpl
All Implemented Interfaces:
DeploymentProjectDao, org.springframework.beans.factory.InitializingBean

public class DeploymentProjectDaoImpl
extends StatelessSessionHibernateDaoSupport
implements DeploymentProjectDao


Field Summary
 
Fields inherited from class org.springframework.dao.support.DaoSupport
logger
 
Constructor Summary
DeploymentProjectDaoImpl()
           
 
Method Summary
 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
 java.util.List<MutableDeploymentProject> findDeploymentProjectsRelatedToArtifact(long artifactId)
           
 java.util.List<MutableDeploymentProject> getAllDeploymentProjects()
           
 MutableDeploymentProjectItem getArtifactProjectItem(long deploymentProjectId, long artifactId)
          Get DeploymentProjectItem by DB id of the DeploymentProject and ArtifactDefinition
 MutableDeploymentProject getDeploymentProject(DeploymentKey key)
          Get DeploymentProject by key
 MutableDeploymentProject getDeploymentProject(long deploymentProjectId)
          Get DeploymentProject by DB id
 MutableDeploymentProject getDeploymentProjectForEnvironment(long environmentId)
          Get DeploymentProject associated with Environment
 MutableDeploymentProject getDeploymentProjectForVersion(long versionId)
          Get DeploymentProject associated with Version
 java.util.List<MutableDeploymentProject> getDeploymentProjectsReferencingArtifact(long artifactId)
          Get all deployment projects that contain a version that uses specified artifact
 java.util.List<MutableDeploymentProject> getDeploymentProjectsRelatedToPlan(PlanKey planKey)
          Get DeploymentProjects linked to Plan with planKey
 MutableDeploymentProjectItem getProjectItem(long deploymentProjectItemId)
          Get DeploymentProjectItem by DB id
 java.util.List<MutableDeploymentProjectItem> getProjectItems(long deploymentProjectId)
          Get list of DeploymentProject items
 MutableVersionNamingScheme getVersionNamingSchemeForProject(long deploymentProjectId)
          Get the version naming configuration for a specific project
 boolean isDeploymentProjectNameConflicting(java.lang.String name)
          Deployment Project Names need to be unique within the system.
 void save(MutableDeploymentProject deploymentProject)
          Save DeploymentProject
 void save(MutableDeploymentProjectItem deploymentProjectItem)
          Save DeploymentProjectItem
 void save(MutableVersionNamingScheme versionNamingScheme)
          Save the version naming Scheme
 
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

DeploymentProjectDaoImpl

public DeploymentProjectDaoImpl()
Method Detail

getAllDeploymentProjects

@NotNull
public java.util.List<MutableDeploymentProject> getAllDeploymentProjects()
Specified by:
getAllDeploymentProjects in interface DeploymentProjectDao
Returns:
list of all DeploymentProjects

getDeploymentProjectsRelatedToPlan

@NotNull
public java.util.List<MutableDeploymentProject> getDeploymentProjectsRelatedToPlan(@NotNull
                                                                                           PlanKey planKey)
Description copied from interface: DeploymentProjectDao
Get DeploymentProjects linked to Plan with planKey

Specified by:
getDeploymentProjectsRelatedToPlan in interface DeploymentProjectDao
Parameters:
planKey - of the linked Plan

findDeploymentProjectsRelatedToArtifact

@NotNull
public java.util.List<MutableDeploymentProject> findDeploymentProjectsRelatedToArtifact(long artifactId)
Specified by:
findDeploymentProjectsRelatedToArtifact in interface DeploymentProjectDao

save

public void save(@NotNull
                 MutableDeploymentProject deploymentProject)
Description copied from interface: DeploymentProjectDao
Save DeploymentProject

Specified by:
save in interface DeploymentProjectDao

getDeploymentProject

public MutableDeploymentProject getDeploymentProject(long deploymentProjectId)
Description copied from interface: DeploymentProjectDao
Get DeploymentProject by DB id

Specified by:
getDeploymentProject in interface DeploymentProjectDao

getDeploymentProject

@Nullable
public MutableDeploymentProject getDeploymentProject(@NotNull
                                                              DeploymentKey key)
Description copied from interface: DeploymentProjectDao
Get DeploymentProject by key

Specified by:
getDeploymentProject in interface DeploymentProjectDao

getDeploymentProjectForEnvironment

@Nullable
public MutableDeploymentProject getDeploymentProjectForEnvironment(long environmentId)
Description copied from interface: DeploymentProjectDao
Get DeploymentProject associated with Environment

Specified by:
getDeploymentProjectForEnvironment in interface DeploymentProjectDao
Parameters:
environmentId - Environment id

getDeploymentProjectForVersion

@Nullable
public MutableDeploymentProject getDeploymentProjectForVersion(long versionId)
Description copied from interface: DeploymentProjectDao
Get DeploymentProject associated with Version

Specified by:
getDeploymentProjectForVersion in interface DeploymentProjectDao
Parameters:
versionId - Version id

isDeploymentProjectNameConflicting

public boolean isDeploymentProjectNameConflicting(@NotNull
                                                  java.lang.String name)
Description copied from interface: DeploymentProjectDao
Deployment Project Names need to be unique within the system. This method checks if a name is already being used

Specified by:
isDeploymentProjectNameConflicting in interface DeploymentProjectDao
Parameters:
name - to check
Returns:
true if the name is already being used, otherwise false.

getProjectItems

@NotNull
public java.util.List<MutableDeploymentProjectItem> getProjectItems(long deploymentProjectId)
Description copied from interface: DeploymentProjectDao
Get list of DeploymentProject items

Specified by:
getProjectItems in interface DeploymentProjectDao

getProjectItem

public MutableDeploymentProjectItem getProjectItem(long deploymentProjectItemId)
Description copied from interface: DeploymentProjectDao
Get DeploymentProjectItem by DB id

Specified by:
getProjectItem in interface DeploymentProjectDao

getArtifactProjectItem

@Nullable
public MutableDeploymentProjectItem getArtifactProjectItem(long deploymentProjectId,
                                                                    long artifactId)
Description copied from interface: DeploymentProjectDao
Get DeploymentProjectItem by DB id of the DeploymentProject and ArtifactDefinition

Specified by:
getArtifactProjectItem in interface DeploymentProjectDao

doesArtifactProjectItemExist

public boolean doesArtifactProjectItemExist(long deploymentProjectId,
                                            long artifactId)
Description copied from interface: DeploymentProjectDao
Check for existence of DeploymentProjectItem by DB id of the DeploymentProject and ArtifactDefinition

Specified by:
doesArtifactProjectItemExist in interface DeploymentProjectDao

save

public void save(MutableDeploymentProjectItem deploymentProjectItem)
Description copied from interface: DeploymentProjectDao
Save DeploymentProjectItem

Specified by:
save in interface DeploymentProjectDao

delete

public void delete(MutableDeploymentProjectItem deploymentProjectItem)
Description copied from interface: DeploymentProjectDao
Delete DeploymentProjectItem

Specified by:
delete in interface DeploymentProjectDao

delete

public void delete(MutableDeploymentProject deploymentProject)
Description copied from interface: DeploymentProjectDao
Delete DeploymentProject and related DeploymentProjectItems

Specified by:
delete in interface DeploymentProjectDao

getVersionNamingSchemeForProject

@Nullable
public MutableVersionNamingScheme getVersionNamingSchemeForProject(long deploymentProjectId)
Description copied from interface: DeploymentProjectDao
Get the version naming configuration for a specific project

Specified by:
getVersionNamingSchemeForProject in interface DeploymentProjectDao
Parameters:
deploymentProjectId - of the project

save

public void save(MutableVersionNamingScheme versionNamingScheme)
Description copied from interface: DeploymentProjectDao
Save the version naming Scheme

Specified by:
save in interface DeploymentProjectDao
Parameters:
versionNamingScheme - to save

delete

public void delete(MutableVersionNamingScheme versionNamingScheme)
Description copied from interface: DeploymentProjectDao
Delete the version naming Scheme

Specified by:
delete in interface DeploymentProjectDao
Parameters:
versionNamingScheme - to delete

getDeploymentProjectsReferencingArtifact

public java.util.List<MutableDeploymentProject> getDeploymentProjectsReferencingArtifact(long artifactId)
Description copied from interface: DeploymentProjectDao
Get all deployment projects that contain a version that uses specified artifact

Specified by:
getDeploymentProjectsReferencingArtifact in interface DeploymentProjectDao
Returns:


Copyright © 2013 Atlassian Software Systems Pty Ltd. All Rights Reserved.