com.atlassian.bamboo.variable.baseline
Class VariableContextBaselineHibernateDao
java.lang.Object
org.springframework.dao.support.DaoSupport
org.springframework.orm.hibernate3.support.HibernateDaoSupport
com.atlassian.bamboo.persistence3.StatelessSessionHibernateDaoSupport
com.atlassian.bamboo.persistence3.BambooHibernateObjectDao<VariableContextBaseline>
com.atlassian.bamboo.variable.baseline.VariableContextBaselineHibernateDao
- All Implemented Interfaces:
- BambooObjectDao<VariableContextBaseline>, VariableContextBaselineDao, org.springframework.beans.factory.InitializingBean
public class VariableContextBaselineHibernateDao
- extends BambooHibernateObjectDao<VariableContextBaseline>
- implements VariableContextBaselineDao
Fields inherited from class org.springframework.dao.support.DaoSupport |
logger |
Methods inherited from class com.atlassian.bamboo.persistence3.BambooHibernateObjectDao |
countAll, countWithRestriction, delete, deleteAll, execute, executeCountQuery, executeReturnInt, executeReturnLong, findAll, findById, save, saveAll |
Methods inherited from class org.springframework.orm.hibernate3.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 |
VariableContextBaselineHibernateDao
public VariableContextBaselineHibernateDao(TransactionAndHibernateTemplate transactionTemplate)
findById
@Nullable
public VariableContextBaseline findById(long id)
- Specified by:
findById
in interface VariableContextBaselineDao
findByDeploymentResultId
@Nullable
public VariableContextBaseline findByDeploymentResultId(long deploymentResultId)
- Specified by:
findByDeploymentResultId
in interface VariableContextBaselineDao
deleteOrphans
public int deleteOrphans()
- Description copied from interface:
VariableContextBaselineDao
- Delete orphaned VariableContextBaseline records.
This should be called after removing DeploymentResult entities.
- Specified by:
deleteOrphans
in interface VariableContextBaselineDao
- Returns:
- number of deleted objects
iterateVariableContextBaselinesForExport
public long iterateVariableContextBaselinesForExport(@NotNull
com.google.common.base.Function<VariableContextBaseline,Void> function)
- Description copied from interface:
VariableContextBaselineDao
- Iterate through and execute function for each of VariableContextBaseline
- Specified by:
iterateVariableContextBaselinesForExport
in interface VariableContextBaselineDao
- Parameters:
function
- function to be executed on each of the VariableContextBaseline
- Returns:
- number of traversed rows
resolveVariableContextBaseline
public VariableContextBaseline resolveVariableContextBaseline(@NotNull
VariableContext variableContext)
- Description copied from interface:
VariableContextBaselineDao
- 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.
- Specified by:
resolveVariableContextBaseline
in interface VariableContextBaselineDao
- Returns:
- existing baseline object if found
Copyright © 2015 Atlassian Software Systems Pty Ltd. All rights reserved.