com.atlassian.bamboo.variable.baseline
Interface VariableContextBaselineDao

All Superinterfaces:
BambooObjectDao<VariableContextBaseline>
All Known Implementing Classes:
VariableContextBaselineHibernateDao

public interface VariableContextBaselineDao
extends BambooObjectDao<VariableContextBaseline>


Method Summary
 int deleteOrphans()
          Delete orphaned VariableContextBaseline records.
 VariableContextBaseline findByDeploymentResultId(long deploymentResultId)
           
 VariableContextBaseline findById(long id)
           
 long iterateVariableContextBaselinesForExport(com.google.common.base.Function<VariableContextBaseline,java.lang.Void> function)
          Iterate through and execute function for each of VariableContextBaseline
 VariableContextBaseline resolveVariableContextBaseline(VariableContext variableContext)
          Searches for a context baseline with exactly the same set of variables.
 
Methods inherited from interface com.atlassian.bamboo.persistence3.BambooObjectDao
delete, deleteAll, executeReturnLong, findAll, findById, save, saveAll
 

Method Detail

findById

@Nullable
VariableContextBaseline findById(long id)

findByDeploymentResultId

@Nullable
VariableContextBaseline findByDeploymentResultId(long deploymentResultId)

resolveVariableContextBaseline

@Nullable
VariableContextBaseline resolveVariableContextBaseline(@NotNull
                                                                VariableContext variableContext)
Searches for a context baseline with exactly the same set of variables. If not found and variable context not empty, new baseline object is created. Method returns null iff variableContext is empty. For performance reasons, search algorithm does not guarantee that it will always find a matching baseline when it exists: it may be limited to recent baseline(s) only.

Returns:
existing baseline object if found

deleteOrphans

int deleteOrphans()
Delete orphaned VariableContextBaseline records. This should be called after removing DeploymentResult entities.

Returns:
number of deleted objects

iterateVariableContextBaselinesForExport

long iterateVariableContextBaselinesForExport(@NotNull
                                              com.google.common.base.Function<VariableContextBaseline,java.lang.Void> function)
Iterate through and execute function for each of VariableContextBaseline

Parameters:
function - function to be executed on each of the VariableContextBaseline
Returns:
number of traversed rows


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