public class EnvironmentDaoImpl extends BambooHibernateObjectDao<MutableEnvironment> implements EnvironmentDao
Constructor and Description |
---|
EnvironmentDaoImpl() |
Modifier and Type | Method and Description |
---|---|
long |
countAll() |
void |
delete(MutableEnvironment environment)
Removes the given entity from the database
|
List<MutableEnvironment> |
findAll() |
List<? extends MutableEnvironment> |
findAll(int firstResult,
int maxResults) |
List<Pair<Requirement,MutableEnvironment>> |
findEnvironmentsByRequirementKey(String requirementKey)
Get requirements to environment mapping by requirement key.
|
MutableEnvironment |
getEnvironment(DeploymentKey environmentKey)
Gets specific Environment by key
|
MutableEnvironment |
getEnvironment(long environmentId)
Gets specific Environment by ID
|
int |
getEnvironmentCount() |
int |
getEnvironmentCountForProject(long deploymentProjectId) |
List<MutableEnvironment> |
getEnvironmentsForDeploymentProject(long deploymentProjectId)
Retrieve all environments for a Deployment Project
|
int |
getLastEnvironmentPosition(long deploymentProjectId) |
boolean |
isEnvironmentNameConflicting(MutableDeploymentProject deploymentProject,
String name)
Check if there is currently an environment with the given name in the given deployment Project.
|
void |
save(MutableEnvironment environment)
Saves the given entity.
|
countAll, countWithRestriction, deleteAll, executeCountQuery, findAll, findById, merge, saveAll
getCacheAwareHibernateTemplate
checkDaoConfig, createHibernateTemplate, currentSession, getHibernateTemplate, getSessionFactory, setHibernateTemplate, setSessionFactory
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
saveAll
@Nullable public MutableEnvironment getEnvironment(long environmentId)
EnvironmentDao
getEnvironment
in interface EnvironmentDao
environmentId
- ID of the environment your looking for.public void save(@NotNull MutableEnvironment environment)
BambooObjectDao
EntityObject
this method will:
- update EntityObject.getLastModificationDate()
- set EntityObject.getCreationDate()
if the object has not been savedsave
in interface EnvironmentDao
save
in interface BambooObjectDao<MutableEnvironment>
save
in class BambooHibernateObjectDao<MutableEnvironment>
environment
- entity to be savedpublic void delete(@NotNull MutableEnvironment environment)
BambooObjectDao
delete
in interface EnvironmentDao
delete
in interface BambooObjectDao<MutableEnvironment>
delete
in class BambooHibernateObjectDao<MutableEnvironment>
environment
- entity to be removed@Nullable public MutableEnvironment getEnvironment(@NotNull DeploymentKey environmentKey)
EnvironmentDao
getEnvironment
in interface EnvironmentDao
environmentKey
- ket of the environment to find@NotNull public List<MutableEnvironment> getEnvironmentsForDeploymentProject(long deploymentProjectId)
EnvironmentDao
getEnvironmentsForDeploymentProject
in interface EnvironmentDao
deploymentProjectId
- of the Deployment Projectpublic boolean isEnvironmentNameConflicting(@NotNull MutableDeploymentProject deploymentProject, @NotNull String name)
EnvironmentDao
isEnvironmentNameConflicting
in interface EnvironmentDao
deploymentProject
- the project to check environments ofname
- to check for conflictpublic List<MutableEnvironment> findAll()
findAll
in interface EnvironmentDao
public int getLastEnvironmentPosition(long deploymentProjectId)
getLastEnvironmentPosition
in interface EnvironmentDao
public int getEnvironmentCount()
getEnvironmentCount
in interface EnvironmentDao
Environment
spublic int getEnvironmentCountForProject(long deploymentProjectId)
getEnvironmentCountForProject
in interface EnvironmentDao
Environment
defined for the projectpublic long countAll()
countAll
in interface EnvironmentDao
public List<? extends MutableEnvironment> findAll(int firstResult, int maxResults)
findAll
in interface EnvironmentDao
@NotNull public List<Pair<Requirement,MutableEnvironment>> findEnvironmentsByRequirementKey(@NotNull String requirementKey)
EnvironmentDao
findEnvironmentsByRequirementKey
in interface EnvironmentDao
requirementKey
- on which environments relyCopyright © 2017 Atlassian Software Systems Pty Ltd. All rights reserved.