com.atlassian.bamboo.plan.vcsRevision
Class PlanVcsRevisionHistoryHibernateDao

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.PlanVcsRevisionHistoryHibernateDao
All Implemented Interfaces:
BambooObjectDao<PlanVcsRevisionHistoryItem>, PlanVcsRevisionHistoryDao, org.springframework.beans.factory.InitializingBean

public class PlanVcsRevisionHistoryHibernateDao
extends BambooHibernateObjectDao<PlanVcsRevisionHistoryItem>
implements PlanVcsRevisionHistoryDao


Field Summary
 
Fields inherited from class org.springframework.dao.support.DaoSupport
logger
 
Constructor Summary
PlanVcsRevisionHistoryHibernateDao()
           
 
Method Summary
 void cleanupUnusedEntriesForPlan(PlanKey planKey)
           
 void createChangeDetectionHistoryItem(PlanVcsRevisionHistoryItem planVcsRevisionHistoryItem)
          Inserts new history item.
 void createOrUpdateChangeDetectionHistoryItem(PlanVcsRevisionHistoryItem planVcsRevisionHistoryItem)
          If item with the same plan key and build number exists it is updated with vcs information from the current one.
 void deleteVcsRevisionHistoryForPlan(PlanKey planKey)
          Deletes entire revision history for a plan.
 java.util.List<PlanVcsRevisionHistoryItem> findLatestVcsRevisionHistoryItems(PlanKey planKey)
          Retrieves a list of history items with the highest build number.
 java.util.List<PlanVcsRevisionHistoryItem> findLatestVcsRevisionHistoryItemsBeforeBuildNumber(PlanKey planKey, int buildNumber)
          Retrieves a list of history items with the highest build number that is lower than the argument.
 PlanVcsRevisionHistoryItem findVcsRevisionHistoryItem(PlanKey planKey, long repositoryId, int buildNumber)
          Retrieves a specific history item.
 
Methods inherited from class com.atlassian.bamboo.persistence3.BambooHibernateObjectDao
delete, deleteAll, 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

PlanVcsRevisionHistoryHibernateDao

public PlanVcsRevisionHistoryHibernateDao()
Method Detail

findVcsRevisionHistoryItem

public PlanVcsRevisionHistoryItem findVcsRevisionHistoryItem(@NotNull
                                                             PlanKey planKey,
                                                             long repositoryId,
                                                             int buildNumber)
Description copied from interface: PlanVcsRevisionHistoryDao
Retrieves a specific history item.

Specified by:
findVcsRevisionHistoryItem in interface PlanVcsRevisionHistoryDao
Returns:

findLatestVcsRevisionHistoryItems

@NotNull
public java.util.List<PlanVcsRevisionHistoryItem> findLatestVcsRevisionHistoryItems(@NotNull
                                                                                            PlanKey planKey)
Description copied from interface: PlanVcsRevisionHistoryDao
Retrieves a list of history items with the highest build number. Note: the highest build number is determined once per plan and not for each repository.

Specified by:
findLatestVcsRevisionHistoryItems in interface PlanVcsRevisionHistoryDao
Returns:

findLatestVcsRevisionHistoryItemsBeforeBuildNumber

@NotNull
public java.util.List<PlanVcsRevisionHistoryItem> findLatestVcsRevisionHistoryItemsBeforeBuildNumber(@NotNull
                                                                                                             PlanKey planKey,
                                                                                                             int buildNumber)
Description copied from interface: PlanVcsRevisionHistoryDao
Retrieves a list of history items with the highest build number that is lower than the argument. Note: the highest build number is determined once per plan and not for each repository.

Specified by:
findLatestVcsRevisionHistoryItemsBeforeBuildNumber in interface PlanVcsRevisionHistoryDao
Returns:

createOrUpdateChangeDetectionHistoryItem

public void createOrUpdateChangeDetectionHistoryItem(@NotNull
                                                     PlanVcsRevisionHistoryItem planVcsRevisionHistoryItem)
Description copied from interface: PlanVcsRevisionHistoryDao
If item with the same plan key and build number exists it is updated with vcs information from the current one. Otherwise new one is created.

Specified by:
createOrUpdateChangeDetectionHistoryItem in interface PlanVcsRevisionHistoryDao

createChangeDetectionHistoryItem

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

Specified by:
createChangeDetectionHistoryItem in interface PlanVcsRevisionHistoryDao

deleteVcsRevisionHistoryForPlan

public void deleteVcsRevisionHistoryForPlan(@NotNull
                                            PlanKey planKey)
Description copied from interface: PlanVcsRevisionHistoryDao
Deletes entire revision history for a plan.

Specified by:
deleteVcsRevisionHistoryForPlan in interface PlanVcsRevisionHistoryDao

cleanupUnusedEntriesForPlan

public void cleanupUnusedEntriesForPlan(@NotNull
                                        PlanKey planKey)
Specified by:
cleanupUnusedEntriesForPlan in interface PlanVcsRevisionHistoryDao


Copyright © 2012 Atlassian. All Rights Reserved.