com.atlassian.bamboo.plan.vcsRevision
Class PlanVcsRevisionHistoryHibernateStandaloneDao

java.lang.Object
  extended by org.springframework.dao.support.DaoSupport
      extended by org.springframework.orm.hibernate.support.HibernateDaoSupport
          extended by com.atlassian.bamboo.persistence3.BambooHibernateObjectDao<PlanVcsRevisionHistoryItem>
              extended by com.atlassian.bamboo.plan.vcsRevision.PlanVcsRevisionHistoryHibernateStandaloneDao
All Implemented Interfaces:
BambooObjectDao<PlanVcsRevisionHistoryItem>, PlanVcsRevisionHistoryStandaloneDao, org.springframework.beans.factory.InitializingBean

public class PlanVcsRevisionHistoryHibernateStandaloneDao
extends BambooHibernateObjectDao<PlanVcsRevisionHistoryItem>
implements PlanVcsRevisionHistoryStandaloneDao


Field Summary
 
Fields inherited from class org.springframework.dao.support.DaoSupport
logger
 
Constructor Summary
PlanVcsRevisionHistoryHibernateStandaloneDao()
           
 
Method Summary
 void createChangeDetectionHistoryItem(PlanVcsRevisionHistoryItem planVcsRevisionHistoryItem)
          Inserts new history item.
 PlanVcsRevisionHistoryItem findLatestVcsRevisionHistoryItem(long repositoryId)
          Retrieves a history item with the highest build number.
 PlanVcsRevisionHistoryItem findLatestVcsRevisionHistoryItem(PlanKey planKey)
          Retrieves a history item with the highest build number.
 void removeVcsHistoryForPlan(PlanKey planKey)
          Remove all history for PlanKey.
 long scrollPlanVcsRevisionHistoryItemsForExport(com.google.common.base.Function<PlanVcsRevisionHistoryItem,java.lang.Void> function)
          Scroll through and execute function for each of PlanVcsRevisionHistoryItem Objects passed to function are not fully initialized.
 void updateRepositoryIdForPlan(PlanKey planKey, long repositoryId)
          Update all repository entries for PlanKey setting repository id in all of them.
 
Methods inherited from class com.atlassian.bamboo.persistence3.BambooHibernateObjectDao
delete, deleteAll, executeFind, executeReturnLong, findAll, findById, save, saveAll
 
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
 
Methods inherited from interface com.atlassian.bamboo.persistence3.BambooObjectDao
delete, deleteAll, executeReturnLong, findAll, findById, save, saveAll
 

Constructor Detail

PlanVcsRevisionHistoryHibernateStandaloneDao

public PlanVcsRevisionHistoryHibernateStandaloneDao()
Method Detail

findLatestVcsRevisionHistoryItem

@Nullable
public PlanVcsRevisionHistoryItem findLatestVcsRevisionHistoryItem(@NotNull
                                                                            PlanKey planKey)
Description copied from interface: PlanVcsRevisionHistoryStandaloneDao
Retrieves a history item with the highest build number.

Specified by:
findLatestVcsRevisionHistoryItem in interface PlanVcsRevisionHistoryStandaloneDao
Returns:

findLatestVcsRevisionHistoryItem

public PlanVcsRevisionHistoryItem findLatestVcsRevisionHistoryItem(long repositoryId)
Description copied from interface: PlanVcsRevisionHistoryStandaloneDao
Retrieves a history item with the highest build number.

Specified by:
findLatestVcsRevisionHistoryItem in interface PlanVcsRevisionHistoryStandaloneDao
Returns:

createChangeDetectionHistoryItem

public void createChangeDetectionHistoryItem(@NotNull
                                             PlanVcsRevisionHistoryItem planVcsRevisionHistoryItem)
Description copied from interface: PlanVcsRevisionHistoryStandaloneDao
Inserts new history item.

Specified by:
createChangeDetectionHistoryItem in interface PlanVcsRevisionHistoryStandaloneDao

scrollPlanVcsRevisionHistoryItemsForExport

public long scrollPlanVcsRevisionHistoryItemsForExport(@NotNull
                                                       com.google.common.base.Function<PlanVcsRevisionHistoryItem,java.lang.Void> function)
Description copied from interface: PlanVcsRevisionHistoryStandaloneDao
Scroll through and execute function for each of PlanVcsRevisionHistoryItem Objects passed to function are not fully initialized. Collections are empty and related objects have only id set.

Specified by:
scrollPlanVcsRevisionHistoryItemsForExport in interface PlanVcsRevisionHistoryStandaloneDao
Parameters:
function - function to be executed on each of the TestClassResults
Returns:
number of traversed rows

updateRepositoryIdForPlan

public void updateRepositoryIdForPlan(@NotNull
                                      PlanKey planKey,
                                      long repositoryId)
Description copied from interface: PlanVcsRevisionHistoryStandaloneDao
Update all repository entries for PlanKey setting repository id in all of them. Used in upgrade task.

Specified by:
updateRepositoryIdForPlan in interface PlanVcsRevisionHistoryStandaloneDao

removeVcsHistoryForPlan

public void removeVcsHistoryForPlan(PlanKey planKey)
Description copied from interface: PlanVcsRevisionHistoryStandaloneDao
Remove all history for PlanKey. Used in upgrade task.

Specified by:
removeVcsHistoryForPlan in interface PlanVcsRevisionHistoryStandaloneDao


Copyright © 2012 Atlassian. All Rights Reserved.