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
Constructors -
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)voidremoveAll(@NotNull Iterable<? extends BambooIdProvider> agentAssignmentIds) Remove a list of agent assignments@NotNull AgentAssignmentsave(@NotNull AgentAssignment agentAssignment) Save an agent assignmentMethods inherited from class com.atlassian.bamboo.persistence3.StatelessSessionHibernateDaoSupport
getCacheAwareHibernateTemplateMethods inherited from class org.springframework.orm.hibernate5.support.HibernateDaoSupport
checkDaoConfig, createHibernateTemplate, currentSession, getHibernateTemplate, getSessionFactory, setHibernateTemplate, setSessionFactoryMethods inherited from class org.springframework.dao.support.DaoSupport
afterPropertiesSet, initDao
-
Constructor Details
-
AgentAssignmentDaoImpl
-
-
Method Details
-
save
Description copied from interface:AgentAssignmentDaoSave an agent assignment- Specified by:
savein interfaceAgentAssignmentDao- Parameters:
agentAssignment- to save- Returns:
- saved agent assignment
-
removeAll
Description copied from interface:AgentAssignmentDaoRemove a list of agent assignments- Specified by:
removeAllin interfaceAgentAssignmentDao- Parameters:
agentAssignmentIds- to be removed
-
getAgentAssignment
Description copied from interface:AgentAssignmentDaoGet a single agent assignment by id- Specified by:
getAgentAssignmentin interfaceAgentAssignmentDao- Parameters:
agentAssignmentId- of assignment to retrieve- Returns:
- assignment with id if found
-
getAssignmentsForEnvironment
Description copied from interface:AgentAssignmentDaoGet all assignments directly reference an environment- Specified by:
getAssignmentsForEnvironmentin 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:AgentAssignmentDaoGet all assignments that directly reference a specific Executor (Agent, Image etc)- Specified by:
getAssignmentsForExecutorin 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:AgentAssignmentDaoGet all assignments that directly reference a specific Executable (Environment, ob etc)- Specified by:
getAssignmentsForExecutablein interfaceAgentAssignmentDao- Parameters:
executableId- id of the executableexecutableType- type of the executable- Returns:
- assignments for executable
-
findAll
- Specified by:
findAllin interfaceAgentAssignmentDao
-