com.atlassian.bamboo.author
Class AuthorHibernateDao
java.lang.Object
org.springframework.dao.support.DaoSupport
org.springframework.orm.hibernate.support.HibernateDaoSupport
com.atlassian.bamboo.persistence3.BambooHibernateObjectDao<ExtendedAuthor>
com.atlassian.bamboo.author.AuthorHibernateDao
- All Implemented Interfaces:
- AuthorDao, BambooObjectDao<ExtendedAuthor>, org.springframework.beans.factory.InitializingBean
public class AuthorHibernateDao
- extends BambooHibernateObjectDao<ExtendedAuthor>
- implements AuthorDao
Fields inherited from class org.springframework.dao.support.DaoSupport |
logger |
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 |
AuthorHibernateDao
public AuthorHibernateDao(PlanDiscriminatorRegistry planDiscriminatorRegistry)
findById
public ExtendedAuthor findById(long id)
- Description copied from interface:
AuthorDao
- Find an
ExtendedAuthor
object of a given id.
- Specified by:
findById
in interface AuthorDao
- Parameters:
id
- id of Author
to be found
- Returns:
ExtendedAuthor
object or null if not found
findAll
@NotNull
public java.util.Collection<? extends ExtendedAuthor> findAll()
- Description copied from interface:
AuthorDao
- Get all
ExtendedAuthor
entities
- Specified by:
findAll
in interface AuthorDao
- Returns:
- Collection of
ExtendedAuthor
getAuthorByName
public ExtendedAuthor getAuthorByName(java.lang.String name)
- Specified by:
getAuthorByName
in interface AuthorDao
- Returns:
- a
ExtendedAuthor
object given an author name
getBuildResultsFailedByAuthor
@NotNull
public java.util.List<ResultsSummary> getBuildResultsFailedByAuthor(ExtendedAuthor author,
int maxResultCount)
- Specified by:
getBuildResultsFailedByAuthor
in interface AuthorDao
- Returns:
List
of BuildResultsSummary
triggered by author and failed
getBuildResultsSuccessfulByAuthor
@NotNull
public java.util.List<ResultsSummary> getBuildResultsSuccessfulByAuthor(ExtendedAuthor author,
int maxResultCount)
- Specified by:
getBuildResultsSuccessfulByAuthor
in interface AuthorDao
- Returns:
List
of BuildResultsSummary
triggered by author and succesful
getBuildResultsBrokenByAuthor
@NotNull
public java.util.List<ResultsSummary> getBuildResultsBrokenByAuthor(ExtendedAuthor author,
int maxResultCount)
- Specified by:
getBuildResultsBrokenByAuthor
in interface AuthorDao
- Returns:
List
of BuildResultsSummary
broken by author
getBuildResultsFixedByAuthor
@NotNull
public java.util.List<ResultsSummary> getBuildResultsFixedByAuthor(ExtendedAuthor author,
int maxResultCount)
- Specified by:
getBuildResultsFixedByAuthor
in interface AuthorDao
- Returns:
List
of BuildResultsSummary
fixed by author
getNumberOfFailedBuildsByAuthor
public int getNumberOfFailedBuildsByAuthor(ExtendedAuthor author)
- Specified by:
getNumberOfFailedBuildsByAuthor
in interface AuthorDao
- Returns:
- int
getNumberOfSuccessfulBuildsByAuthor
public int getNumberOfSuccessfulBuildsByAuthor(ExtendedAuthor author)
- Specified by:
getNumberOfSuccessfulBuildsByAuthor
in interface AuthorDao
- Returns:
- int
getNumberOfBuildFixedByAuthor
public int getNumberOfBuildFixedByAuthor(ExtendedAuthor author)
- Specified by:
getNumberOfBuildFixedByAuthor
in interface AuthorDao
- Returns:
- int
getNumberOfBuildBrokenByAuthor
public int getNumberOfBuildBrokenByAuthor(ExtendedAuthor author)
- Specified by:
getNumberOfBuildBrokenByAuthor
in interface AuthorDao
- Returns:
- int
getAllUnlinkedAuthors
@NotNull
public java.util.Set<ExtendedAuthor> getAllUnlinkedAuthors()
- Specified by:
getAllUnlinkedAuthors
in interface AuthorDao
- Returns:
Set
of ExtendedAuthor
which are not yet linked to any user.
getLinkedAuthorsForUser
@NotNull
public java.util.List<ExtendedAuthor> getLinkedAuthorsForUser(com.atlassian.user.User user)
- Specified by:
getLinkedAuthorsForUser
in interface AuthorDao
- Returns:
List
of ExtendedAuthor
which are linked to a given user.
getBuildResultsTriggeredByAuthor
@NotNull
public java.util.List<ResultsSummary> getBuildResultsTriggeredByAuthor(ExtendedAuthor author,
int maxResultCount)
- Specified by:
getBuildResultsTriggeredByAuthor
in interface AuthorDao
- Returns:
List
of BuildResultsSummary
triggered by author
getRecentResultsTriggeredByAuthors
@NotNull
public java.util.List<ResultsSummary> getRecentResultsTriggeredByAuthors(java.util.List<ExtendedAuthor> authors,
int daysToFilter)
- Description copied from interface:
AuthorDao
- Retrieve all build results triggered by the author in the last X days
- Specified by:
getRecentResultsTriggeredByAuthors
in interface AuthorDao
- Parameters:
authors
- the builds will be triggered bydaysToFilter
- number of days to look back in history
- Returns:
- all build results triggered by the author in the last X days
getNumberOfBuildsTriggeredByAuthor
public int getNumberOfBuildsTriggeredByAuthor(ExtendedAuthor author)
- Specified by:
getNumberOfBuildsTriggeredByAuthor
in interface AuthorDao
- Returns:
- int
unlinkLinkedAuthors
public void unlinkLinkedAuthors(@NotNull
com.atlassian.user.User user)
- Description copied from interface:
AuthorDao
- Removes the link between User and all Author entities, User was linked to
- Specified by:
unlinkLinkedAuthors
in interface AuthorDao
- Parameters:
user
- user
updateLinkedAuthors
public void updateLinkedAuthors(@NotNull
com.atlassian.user.User user,
@NotNull
java.util.List<java.lang.Long> authorIds)
- Description copied from interface:
AuthorDao
- Updates list of Authors linked to a User.
As a result of this operation only
Author
s with id listed in authorIds will be linked to user
- Specified by:
updateLinkedAuthors
in interface AuthorDao
- Parameters:
user
- userauthorIds
- list of Author
id that should be linked to user
Copyright © 2012 Atlassian. All Rights Reserved.