public class AuthorHibernateDao extends BambooHibernateObjectDao<ExtendedAuthor> implements AuthorDao
| Constructor and Description |
|---|
AuthorHibernateDao(PlanDiscriminatorRegistry planDiscriminatorRegistry) |
| Modifier and Type | Method and Description |
|---|---|
Collection<? extends ExtendedAuthor> |
findAll()
Get all
ExtendedAuthor entities |
List<Author> |
findAuthorsByLinkedUser(String userSearchString)
Performs a case insensitive search for authors by their linkedUserName.
|
List<Author> |
findAuthorsByName(String authorSearchString)
Performs a case insensitive search for authors by their author name.
|
List<Author> |
findAuthorsThatStartWith(String authorSearchString,
boolean unlinkedOnly)
Performs a case insensitive search for authors by their author name.
|
ExtendedAuthor |
findById(long id)
Find an
ExtendedAuthor object of a given id. |
Set<ExtendedAuthor> |
getAllUnlinkedAuthors() |
ExtendedAuthor |
getAuthorByName(String name) |
Set<Author> |
getAuthorsByResultSummary(ResultsSummary resultsSummary)
Retrieve unique set of authors that contributed to commits related to a given ResultsSummary
|
List<ResultsSummary> |
getBuildResultsBrokenByAuthor(ExtendedAuthor author,
int maxResultCount) |
List<ResultsSummary> |
getBuildResultsFailedByAuthor(ExtendedAuthor author,
int maxResultCount) |
List<ResultsSummary> |
getBuildResultsFixedByAuthor(ExtendedAuthor author,
int maxResultCount) |
List<ResultsSummary> |
getBuildResultsSuccessfulByAuthor(ExtendedAuthor author,
int maxResultCount) |
List<ResultsSummary> |
getBuildResultsTriggeredByAuthor(ExtendedAuthor author,
int maxResultCount) |
List<ExtendedAuthor> |
getLinkedAuthorsForUser(com.atlassian.user.User user) |
int |
getNumberOfBuildBrokenByAuthor(ExtendedAuthor author) |
int |
getNumberOfBuildFixedByAuthor(ExtendedAuthor author) |
int |
getNumberOfBuildsTriggeredByAuthor(ExtendedAuthor author) |
int |
getNumberOfFailedBuildsByAuthor(ExtendedAuthor author) |
int |
getNumberOfSuccessfulBuildsByAuthor(ExtendedAuthor author) |
List<ResultsSummary> |
getRecentResultsTriggeredByAuthors(List<ExtendedAuthor> authors,
int daysToFilter)
Retrieve all build results triggered by the author in the last X days
|
void |
unlinkLinkedAuthors(String username)
Removes all links between a user and author entities.
|
void |
updateLinkedAuthors(com.atlassian.user.User user,
List<Long> authorIds)
Updates list of Authors linked to a User.
|
countAll, countWithRestriction, delete, deleteAll, executeCountQuery, findAll, findById, merge, save, saveAllgetCacheAwareHibernateTemplatecheckDaoConfig, createHibernateTemplate, currentSession, getHibernateTemplate, getSessionFactory, setHibernateTemplate, setSessionFactoryclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitunlinkLinkedAuthorscountAll, countWithRestriction, delete, deleteAll, findAll, findById, merge, save, saveAllpublic AuthorHibernateDao(PlanDiscriminatorRegistry planDiscriminatorRegistry)
public ExtendedAuthor findById(long id)
AuthorDaoExtendedAuthor object of a given id.findById in interface AuthorDaoid - id of Author to be foundExtendedAuthor object or null if not found@NotNull public Collection<? extends ExtendedAuthor> findAll()
AuthorDaoExtendedAuthor entitiesfindAll in interface AuthorDaoExtendedAuthor@Nullable public ExtendedAuthor getAuthorByName(String name)
getAuthorByName in interface AuthorDaoExtendedAuthor object given an author name@NotNull public List<ResultsSummary> getBuildResultsFailedByAuthor(ExtendedAuthor author, int maxResultCount)
getBuildResultsFailedByAuthor in interface AuthorDaoList of BuildResultsSummary triggered by author and failed@NotNull public List<ResultsSummary> getBuildResultsSuccessfulByAuthor(ExtendedAuthor author, int maxResultCount)
getBuildResultsSuccessfulByAuthor in interface AuthorDaoList of BuildResultsSummary triggered by author and succesful@NotNull public List<ResultsSummary> getBuildResultsBrokenByAuthor(ExtendedAuthor author, int maxResultCount)
getBuildResultsBrokenByAuthor in interface AuthorDaoList of BuildResultsSummary broken by author@NotNull public List<ResultsSummary> getBuildResultsFixedByAuthor(ExtendedAuthor author, int maxResultCount)
getBuildResultsFixedByAuthor in interface AuthorDaoList of BuildResultsSummary fixed by authorpublic int getNumberOfFailedBuildsByAuthor(ExtendedAuthor author)
getNumberOfFailedBuildsByAuthor in interface AuthorDaopublic int getNumberOfSuccessfulBuildsByAuthor(ExtendedAuthor author)
getNumberOfSuccessfulBuildsByAuthor in interface AuthorDaopublic int getNumberOfBuildFixedByAuthor(ExtendedAuthor author)
getNumberOfBuildFixedByAuthor in interface AuthorDaopublic int getNumberOfBuildBrokenByAuthor(ExtendedAuthor author)
getNumberOfBuildBrokenByAuthor in interface AuthorDao@NotNull public Set<ExtendedAuthor> getAllUnlinkedAuthors()
getAllUnlinkedAuthors in interface AuthorDaoSet of ExtendedAuthor which are not yet linked to any user.@NotNull public List<ExtendedAuthor> getLinkedAuthorsForUser(com.atlassian.user.User user)
getLinkedAuthorsForUser in interface AuthorDaoList of ExtendedAuthor which are linked to a given user.@NotNull public List<ResultsSummary> getBuildResultsTriggeredByAuthor(ExtendedAuthor author, int maxResultCount)
getBuildResultsTriggeredByAuthor in interface AuthorDaoList of BuildResultsSummary triggered by author@NotNull public List<ResultsSummary> getRecentResultsTriggeredByAuthors(List<ExtendedAuthor> authors, int daysToFilter)
AuthorDaogetRecentResultsTriggeredByAuthors in interface AuthorDaoauthors - the builds will be triggered bydaysToFilter - number of days to look back in historypublic int getNumberOfBuildsTriggeredByAuthor(ExtendedAuthor author)
getNumberOfBuildsTriggeredByAuthor in interface AuthorDaopublic void unlinkLinkedAuthors(@NotNull
String username)
AuthorDaounlinkLinkedAuthors in interface AuthorDaousername - name of the userpublic void updateLinkedAuthors(@NotNull
com.atlassian.user.User user,
@NotNull
List<Long> authorIds)
AuthorDaoAuthors with id listed in authorIds will be linked to userupdateLinkedAuthors in interface AuthorDaouser - userauthorIds - list of Author id that should be linked to user@NotNull public List<Author> findAuthorsByLinkedUser(@NotNull String userSearchString)
AuthorDaofindAuthorsByLinkedUser in interface AuthorDaouserSearchString - string to search for@NotNull public List<Author> findAuthorsByName(@NotNull String authorSearchString)
AuthorDaofindAuthorsByName in interface AuthorDaoauthorSearchString - string to search for@NotNull public List<Author> findAuthorsThatStartWith(@NotNull String authorSearchString, boolean unlinkedOnly)
AuthorDaofindAuthorsThatStartWith in interface AuthorDaoauthorSearchString - string to search forunlinkedOnly - if true will only return users which have not been linked with a user already@NotNull public Set<Author> getAuthorsByResultSummary(@NotNull ResultsSummary resultsSummary)
AuthorDaogetAuthorsByResultSummary in interface AuthorDaoresultsSummary - ResultsSummaryCopyright © 2019 Atlassian Software Systems Pty Ltd. All rights reserved.