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(java.lang.String 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(java.lang.String planKey)
          Deletes entire revision history for a plan.
 PlanVcsRevisionHistoryItem findLatestVcsRevisionHistoryItem(java.lang.String planKey)
          Retrieves a history item with the highest build number.
 PlanVcsRevisionHistoryItem findLatestVcsRevisionHistoryItemBeforeBuildNumber(java.lang.String planKey, int buildNumber)
          Retrieves a history item with the highest build number that is lower than the argument.
 PlanVcsRevisionHistoryItem findVcsRevisionHistoryItem(java.lang.String planKey, int buildNumber)
          Retrieves a specific history item.
 void revertVcsRevisionForResult(java.lang.String planKey, int buildNumber)
          Deletes history item with specific key and build number.
 
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
                                                             java.lang.String planKey,
                                                             int buildNumber)
Description copied from interface: PlanVcsRevisionHistoryDao
Retrieves a specific history item.

Specified by:
findVcsRevisionHistoryItem in interface PlanVcsRevisionHistoryDao
Returns:

findLatestVcsRevisionHistoryItem

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

Specified by:
findLatestVcsRevisionHistoryItem in interface PlanVcsRevisionHistoryDao
Returns:

findLatestVcsRevisionHistoryItemBeforeBuildNumber

public PlanVcsRevisionHistoryItem findLatestVcsRevisionHistoryItemBeforeBuildNumber(@NotNull
                                                                                    java.lang.String planKey,
                                                                                    int buildNumber)
Description copied from interface: PlanVcsRevisionHistoryDao
Retrieves a history item with the highest build number that is lower than the argument.

Specified by:
findLatestVcsRevisionHistoryItemBeforeBuildNumber 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

revertVcsRevisionForResult

public void revertVcsRevisionForResult(@NotNull
                                       java.lang.String planKey,
                                       int buildNumber)
Description copied from interface: PlanVcsRevisionHistoryDao
Deletes history item with specific key and build number.

Specified by:
revertVcsRevisionForResult in interface PlanVcsRevisionHistoryDao

deleteVcsRevisionHistoryForPlan

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

Specified by:
deleteVcsRevisionHistoryForPlan in interface PlanVcsRevisionHistoryDao

cleanupUnusedEntriesForPlan

public void cleanupUnusedEntriesForPlan(@NotNull
                                        java.lang.String planKey)
Specified by:
cleanupUnusedEntriesForPlan in interface PlanVcsRevisionHistoryDao


Copyright © 2011 Atlassian. All Rights Reserved.