Class AgentAssignmentDaoImpl
java.lang.Object
org.springframework.dao.support.DaoSupport
org.springframework.orm.hibernate5.support.HibernateDaoSupport
com.atlassian.bamboo.persistence3.StatelessSessionHibernateDaoSupport
com.atlassian.bamboo.buildqueue.dao.AgentAssignmentDaoImpl
- All Implemented Interfaces:
AgentAssignmentDao
,org.springframework.beans.factory.InitializingBean
public class AgentAssignmentDaoImpl
extends StatelessSessionHibernateDaoSupport
implements AgentAssignmentDao
-
Field Summary
Fields inherited from class org.springframework.dao.support.DaoSupport
logger
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescription@NotNull List<AgentAssignment>
findAll()
getAgentAssignment
(long agentAssignmentId) Get a single agent assignment by id@NotNull List<AgentAssignment>
getAssignmentsForEnvironment
(long environmentId) Get all assignments directly reference an environment@NotNull List<AgentAssignment>
getAssignmentsForExecutable
(long executableId, AgentAssignment.ExecutableType executableType) Get all assignments that directly reference a specific Executable (Environment, ob etc)@NotNull List<AgentAssignment>
getAssignmentsForExecutor
(long executorId, AgentAssignment.ExecutorType executorType) Get all assignments that directly reference a specific Executor (Agent, Image etc)void
removeAll
(@NotNull Iterable<? extends BambooIdProvider> agentAssignmentIds) Remove a list of agent assignments@NotNull AgentAssignment
save
(@NotNull AgentAssignment agentAssignment) Save an agent assignmentMethods inherited from class com.atlassian.bamboo.persistence3.StatelessSessionHibernateDaoSupport
getCacheAwareHibernateTemplate
Methods inherited from class org.springframework.orm.hibernate5.support.HibernateDaoSupport
checkDaoConfig, createHibernateTemplate, currentSession, getHibernateTemplate, getSessionFactory, setHibernateTemplate, setSessionFactory
Methods inherited from class org.springframework.dao.support.DaoSupport
afterPropertiesSet, initDao
-
Constructor Details
-
AgentAssignmentDaoImpl
-
-
Method Details
-
save
Description copied from interface:AgentAssignmentDao
Save an agent assignment- Specified by:
save
in interfaceAgentAssignmentDao
- Parameters:
agentAssignment
- to save- Returns:
- saved agent assignment
-
removeAll
Description copied from interface:AgentAssignmentDao
Remove a list of agent assignments- Specified by:
removeAll
in interfaceAgentAssignmentDao
- Parameters:
agentAssignmentIds
- to be removed
-
getAgentAssignment
Description copied from interface:AgentAssignmentDao
Get a single agent assignment by id- Specified by:
getAgentAssignment
in interfaceAgentAssignmentDao
- Parameters:
agentAssignmentId
- of assignment to retrieve- Returns:
- assignment with id if found
-
getAssignmentsForEnvironment
Description copied from interface:AgentAssignmentDao
Get all assignments directly reference an environment- Specified by:
getAssignmentsForEnvironment
in interfaceAgentAssignmentDao
- Parameters:
environmentId
- that would be referenced- Returns:
- assignments for environment
-
getAssignmentsForExecutor
@NotNull public @NotNull List<AgentAssignment> getAssignmentsForExecutor(long executorId, @NotNull AgentAssignment.ExecutorType executorType) Description copied from interface:AgentAssignmentDao
Get all assignments that directly reference a specific Executor (Agent, Image etc)- Specified by:
getAssignmentsForExecutor
in interfaceAgentAssignmentDao
- Parameters:
executorId
- id of the executorexecutorType
- type of the executor- Returns:
- assignmnets for executor
-
getAssignmentsForExecutable
@NotNull public @NotNull List<AgentAssignment> getAssignmentsForExecutable(long executableId, @NotNull AgentAssignment.ExecutableType executableType) Description copied from interface:AgentAssignmentDao
Get all assignments that directly reference a specific Executable (Environment, ob etc)- Specified by:
getAssignmentsForExecutable
in interfaceAgentAssignmentDao
- Parameters:
executableId
- id of the executableexecutableType
- type of the executable- Returns:
- assignments for executable
-
findAll
- Specified by:
findAll
in interfaceAgentAssignmentDao
-