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
-
-
Constructor Summary
Constructors Constructor Description AgentAssignmentDaoImpl(TransactionAndHibernateTemplate transactionTemplate)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description @NotNull List<AgentAssignment>
findAll()
AgentAssignment
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 assignment-
Methods inherited from class com.atlassian.bamboo.persistence3.StatelessSessionHibernateDaoSupport
getCacheAwareHibernateTemplate
-
-
-
-
Constructor Detail
-
AgentAssignmentDaoImpl
public AgentAssignmentDaoImpl(TransactionAndHibernateTemplate transactionTemplate)
-
-
Method Detail
-
save
@NotNull public @NotNull AgentAssignment save(@NotNull @NotNull AgentAssignment agentAssignment)
Description copied from interface:AgentAssignmentDao
Save an agent assignment- Specified by:
save
in interfaceAgentAssignmentDao
- Parameters:
agentAssignment
- to save- Returns:
- saved agent assignment
-
removeAll
public void removeAll(@NotNull @NotNull Iterable<? extends BambooIdProvider> agentAssignmentIds)
Description copied from interface:AgentAssignmentDao
Remove a list of agent assignments- Specified by:
removeAll
in interfaceAgentAssignmentDao
- Parameters:
agentAssignmentIds
- to be removed
-
getAgentAssignment
public AgentAssignment getAgentAssignment(long agentAssignmentId)
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
@NotNull public @NotNull List<AgentAssignment> getAssignmentsForEnvironment(long environmentId)
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
@NotNull public @NotNull List<AgentAssignment> findAll()
- Specified by:
findAll
in interfaceAgentAssignmentDao
-
-