com.atlassian.bamboo.buildqueue.dao
Class AgentAssignmentDaoImpl

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.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
AgentAssignmentDaoImpl()
           
 
Method Summary
 java.util.List<AgentAssignment> findAll()
           
 AgentAssignment getAgentAssignment(long agentAssignmentId)
          Get a single agent assignment by id
 java.util.List<AgentAssignment> getAssignmentsForAgent(long agentId)
          Get all assignments directly referencing and agent
 java.util.List<AgentAssignment> getAssignmentsForEnvironment(long environmentId)
          Get all assignments directly reference an environment
 java.util.List<AgentAssignment> getAssignmentsForExecutable(long executableId, AgentAssignment.ExecutableType executableType)
          Get all assignments that directly reference a specific Executable (Environment, ob etc)
 java.util.List<AgentAssignment> getAssignmentsForExecutor(long executorId, AgentAssignment.ExecutorType executorType)
          Get all assignments that directly reference a specific Executor (Agent, Image etc)
 java.util.List<AgentAssignment> getAssignmentsForImage(long imageConfigurationId)
          Get all assignments directly reference to an image
 void removeAll(java.lang.Iterable<? extends BambooIdProvider> agentAssignmentIds)
          Remove a list of agent assignments
 AgentAssignment save(AgentAssignment agentAssignment)
          Save an agent assignment
 
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

AgentAssignmentDaoImpl

public AgentAssignmentDaoImpl()
Method Detail

save

@NotNull
public AgentAssignment save(@NotNull
                                    AgentAssignment agentAssignment)
Description copied from interface: AgentAssignmentDao
Save an agent assignment

Specified by:
save in interface AgentAssignmentDao
Parameters:
agentAssignment - to save
Returns:
saved agent assignment

removeAll

public void removeAll(@NotNull
                      java.lang.Iterable<? extends BambooIdProvider> agentAssignmentIds)
Description copied from interface: AgentAssignmentDao
Remove a list of agent assignments

Specified by:
removeAll in interface AgentAssignmentDao
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 interface AgentAssignmentDao
Parameters:
agentAssignmentId - of assignment to retrieve
Returns:
assignment with id if found

getAssignmentsForAgent

@NotNull
public java.util.List<AgentAssignment> getAssignmentsForAgent(long agentId)
Description copied from interface: AgentAssignmentDao
Get all assignments directly referencing and agent

Specified by:
getAssignmentsForAgent in interface AgentAssignmentDao
Parameters:
agentId - that would be referenced
Returns:
assignments for agent

getAssignmentsForImage

@NotNull
public java.util.List<AgentAssignment> getAssignmentsForImage(long imageConfigurationId)
Description copied from interface: AgentAssignmentDao
Get all assignments directly reference to an image

Specified by:
getAssignmentsForImage in interface AgentAssignmentDao
Parameters:
imageConfigurationId - that would be referenced
Returns:
assignments for image

getAssignmentsForEnvironment

@NotNull
public java.util.List<AgentAssignment> getAssignmentsForEnvironment(long environmentId)
Description copied from interface: AgentAssignmentDao
Get all assignments directly reference an environment

Specified by:
getAssignmentsForEnvironment in interface AgentAssignmentDao
Parameters:
environmentId - that would be referenced
Returns:
assignments for environment

getAssignmentsForExecutor

@NotNull
public java.util.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 interface AgentAssignmentDao
Parameters:
executorId - id of the executor
executorType - type of the executor
Returns:
assignmnets for executor

getAssignmentsForExecutable

@NotNull
public java.util.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 interface AgentAssignmentDao
Parameters:
executableId - id of the executable
executableType - type of the executable
Returns:
assignments for executable

findAll

@NotNull
public java.util.List<AgentAssignment> findAll()
Specified by:
findAll in interface AgentAssignmentDao


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