com.atlassian.bamboo.commit
Class CommitHibernateDao

java.lang.Object
  extended by org.springframework.dao.support.DaoSupport
      extended by org.springframework.orm.hibernate.support.HibernateDaoSupport
          extended by com.atlassian.bamboo.persistence3.StatelessSessionHibernateDaoSupport
              extended by com.atlassian.bamboo.persistence3.BambooHibernateObjectDao<Commit>
                  extended by com.atlassian.bamboo.commit.CommitHibernateDao
All Implemented Interfaces:
CommitDao, BambooObjectDao<Commit>, org.springframework.beans.factory.InitializingBean

public class CommitHibernateDao
extends BambooHibernateObjectDao<Commit>
implements CommitDao


Field Summary
 
Fields inherited from class org.springframework.dao.support.DaoSupport
logger
 
Constructor Summary
CommitHibernateDao()
           
 
Method Summary
 java.util.List<Commit> getCommitsForResult(ResultsSummary resultsSummary)
           
 java.util.List<UnassociatedCommit> getCommitsForUser(java.lang.String username, int max)
          Find recent commits for a given user.
 long scrollCommitsForExport(com.google.common.base.Function<Commit,java.lang.Void> function)
          Scroll through and execute function for each of Commit Objects passed to function are not fully initialized.
 
Methods inherited from class com.atlassian.bamboo.persistence3.BambooHibernateObjectDao
delete, deleteAll, execute, executeCountQuery, executeFind, executeReturnLong, findAll, findById, save, saveAll
 
Methods inherited from class com.atlassian.bamboo.persistence3.StatelessSessionHibernateDaoSupport
getCacheAwareHibernateTemplate
 
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

CommitHibernateDao

public CommitHibernateDao()
Method Detail

scrollCommitsForExport

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

Specified by:
scrollCommitsForExport in interface CommitDao
Parameters:
function - function to be executed on each of the Commit
Returns:
number of traversed rows

getCommitsForResult

@NotNull
public java.util.List<Commit> getCommitsForResult(@NotNull
                                                          ResultsSummary resultsSummary)
Specified by:
getCommitsForResult in interface CommitDao
Parameters:
resultsSummary - ResultsSummary which associated commits have to be returned
Returns:
commits for the given ResultsSummary

getCommitsForUser

@NotNull
public java.util.List<UnassociatedCommit> getCommitsForUser(@NotNull
                                                                    java.lang.String username,
                                                                    int max)
Description copied from interface: CommitDao
Find recent commits for a given user.

Specified by:
getCommitsForUser in interface CommitDao
Parameters:
username - to find commits for (based on author -> username association)
max - maximum number of entries to retrieve
Returns:
Representation of the commit.


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