Interface AgentAssignmentDao
-
- All Known Implementing Classes:
AgentAssignmentDaoImpl
public interface AgentAssignmentDao
For dealing with agent assignment database objects
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description @NotNull List<AgentAssignment>
findAll()
@Nullable 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, @NotNull AgentAssignment.ExecutableType executableType)
Get all assignments that directly reference a specific Executable (Environment, ob etc)@NotNull List<AgentAssignment>
getAssignmentsForExecutor(long executorId, @NotNull AgentAssignment.ExecutorType executorType)
Get all assignments that directly reference a specific Executor (Agent, Image etc)void
removeAll(@NotNull Iterable<? extends BambooIdProvider> agentAssignments)
Remove a list of agent assignments@NotNull AgentAssignment
save(@NotNull AgentAssignment agentAssignment)
Save an agent assignment
-
-
-
Method Detail
-
save
@NotNull @NotNull AgentAssignment save(@NotNull @NotNull AgentAssignment agentAssignment)
Save an agent assignment- Parameters:
agentAssignment
- to save- Returns:
- saved agent assignment
-
removeAll
void removeAll(@NotNull @NotNull Iterable<? extends BambooIdProvider> agentAssignments)
Remove a list of agent assignments- Parameters:
agentAssignments
- to be removed
-
getAgentAssignment
@Nullable @Nullable AgentAssignment getAgentAssignment(long agentAssignmentId)
Get a single agent assignment by id- Parameters:
agentAssignmentId
- of assignment to retrieve- Returns:
- assignment with id if found
-
getAssignmentsForEnvironment
@NotNull @NotNull List<AgentAssignment> getAssignmentsForEnvironment(long environmentId)
Get all assignments directly reference an environment- Parameters:
environmentId
- that would be referenced- Returns:
- assignments for environment
-
getAssignmentsForExecutor
@NotNull @NotNull List<AgentAssignment> getAssignmentsForExecutor(long executorId, @NotNull @NotNull AgentAssignment.ExecutorType executorType)
Get all assignments that directly reference a specific Executor (Agent, Image etc)- Parameters:
executorId
- id of the executorexecutorType
- type of the executor- Returns:
- assignmnets for executor
-
getAssignmentsForExecutable
@NotNull @NotNull List<AgentAssignment> getAssignmentsForExecutable(long executableId, @NotNull @NotNull AgentAssignment.ExecutableType executableType)
Get all assignments that directly reference a specific Executable (Environment, ob etc)- Parameters:
executableId
- id of the executableexecutableType
- type of the executable- Returns:
- assignments for executable
-
findAll
@NotNull @NotNull List<AgentAssignment> findAll()
-
-