Constructor | Description |
---|---|
IssueDAOImpl() |
Modifier and Type | Method | Description |
---|---|---|
Long |
countAllIssues() |
Count all Issues in database
|
Long |
countByComponent(Integer componentId) |
Counts the number of issues attached to a component.
|
Long |
countByProject(Integer projectId) |
Counts the number of issues of the given project.
|
Long |
countByProjectAndHigherStatus(Integer projectId,
int minStatus) |
Counts the number of issues of the given project with a status
higher than or equal to the given one.
|
Long |
countByProjectAndLowerStatus(Integer projectId,
int maxExclusiveStatus) |
Counts the number of issues of the given project with a status
lower than the given one.
|
Long |
countByVersion(Integer versionId) |
Counts the number of issues attached to a version.
|
List<Issue> |
findAll() |
Finds all issues in all projects.
|
List<Issue> |
findByComponent(Integer componentId) |
Finds all issues of the component with the given ID.
|
List<Issue> |
findByCreator(Integer creatorId,
int maxExclusiveStatus) |
Finds all issues created by the given user in all projects
and with a status less than the given one.
|
List<Issue> |
findByCreatorInAvailableProjects(Integer creatorId,
int maxExclusiveStatus) |
Finds all issues created by the given user in all active and viewable
projects and with a status less than the given one.
|
List<Issue> |
findByNotification(Integer userId,
int maxExclusiveStatus) |
Finds all issues with notifications for the given user in all projects
and with a status less than the given one.
|
List<Issue> |
findByNotificationInAvailableProjects(Integer userId,
int maxExclusiveStatus) |
Finds all issues with notifications for the given user in active
and viewable projects.
|
List<Issue> |
findByOwner(Integer ownerId,
int maxExclusiveStatus) |
Finds all issues owned by the given user in all projects
and with a status lower than the given one.
|
List<Issue> |
findByOwnerInAvailableProjects(Integer ownerId,
int maxExclusiveStatus) |
Finds all issues owned by the given user in all active and viewable
projects and with a status less than the given one.
|
Issue |
findByPrimaryKey(Integer issueId) |
Finds the issue with the given ID.
|
List<Issue> |
findByProject(Integer projectId) |
Finds all issues of the given project.
|
List<Issue> |
findByProjectAndHigherStatus(Integer projectId,
int status) |
Finds all issues of the given project with a status higher than
or equal to the given one.
|
List<Issue> |
findByProjectAndLowerStatus(Integer projectId,
int maxExclusiveStatus) |
Finds all issues of the given project with a status lower than
the given one.
|
List<Issue> |
findBySeverity(int severity) |
Finds all issues with the given severity in all projects.
|
List<Issue> |
findByStatus(int status) |
Finds all issues in the given status in all projects.
|
List<Issue> |
findByStatusLessThan(int maxExclusiveStatus) |
Finds all issues with a status less than the given one in all projects.
|
List<Issue> |
findByStatusLessThanEqualTo(int maxStatus) |
Finds all issues with a status less than or equal to the given status
in all projects.
|
List<Issue> |
findByStatusLessThanEqualToInAvailableProjects(int maxStatus) |
Finds all issues with a status less than or equal to the given status
in active and viewable projects.
|
List<Issue> |
findByTargetVersion(Integer versionId) |
Delete all issues targeted for the specified version.
|
List<Issue> |
findByVersion(Integer versionId) |
Finds all issues of the version with the given ID.
|
List<Issue> |
findNextIssues(Integer issueId) |
Get the next issues in the project based on ID.
|
List<Issue> |
findPreviousIssues(Integer issueId) |
Get the next issues in the project based on ID.
|
List<Issue> |
findUnassignedIssues(int maxStatus) |
Finds all issues without owner with a status less than
or equal to the given one in all projects.
|
ProjectDAO |
getProjectDAO() |
|
Collection<?> |
getProjectsObjects(IssueSearchQuery query) |
|
Date |
latestModificationDate(Integer projectId) |
Returns the modification date of the latest modified issue
in the project with the given id.
|
List<Issue> |
query(IssueSearchQuery searchQuery,
User user,
Map<Integer,Set<PermissionType>> userPermissions) |
It doens't really make sense for this method to receive projectDAO, it's just a quick
fix for the fact that IssueSearchQuery handles ids and not objects
|
void |
setProjectDAO(ProjectDAO projectDAO) |
delete, detach, merge, refresh, save, saveOrUpdate
delete, detach, merge, refresh, save, saveOrUpdate
public Issue findByPrimaryKey(Integer issueId)
IssueDAO
PENDING: should this method throw a NoSuchEntityException instead of returning null if the issue doesn't exist ?
findByPrimaryKey
in interface IssueDAO
issueId
- ID of the issue to retrievepublic Long countAllIssues()
IssueDAO
countAllIssues
in interface IssueDAO
public List<Issue> findAll()
IssueDAO
PENDING: do we really need to retrieve all issues at once ? It can cause OutOfMemoryError depending on the DB size! Consider scrolling through an issues result set in case we really do.
public List<Issue> findByStatus(int status)
IssueDAO
findByStatus
in interface IssueDAO
status
- status of the issues to returnpublic List<Issue> findByStatusLessThan(int maxExclusiveStatus)
IssueDAO
findByStatusLessThan
in interface IssueDAO
maxExclusiveStatus
- all issues under this status will be returnedpublic List<Issue> findByStatusLessThanEqualTo(int maxStatus)
IssueDAO
findByStatusLessThanEqualTo
in interface IssueDAO
maxStatus
- all issues less that or equal to this status will be returnedpublic List<Issue> findByStatusLessThanEqualToInAvailableProjects(int maxStatus)
IssueDAO
findByStatusLessThanEqualToInAvailableProjects
in interface IssueDAO
maxStatus
- all issues less that or equal to this status will be returnedpublic List<Issue> findBySeverity(int severity)
IssueDAO
findBySeverity
in interface IssueDAO
severity
- severity of the issues to returnpublic List<Issue> findByProject(Integer projectId)
IssueDAO
findByProject
in interface IssueDAO
projectId
- ID of the project of which to retrieve all issuespublic Long countByProject(Integer projectId)
IssueDAO
countByProject
in interface IssueDAO
projectId
- ID of the project of which to count issuespublic List<Issue> findByProjectAndLowerStatus(Integer projectId, int maxExclusiveStatus)
IssueDAO
findByProjectAndLowerStatus
in interface IssueDAO
projectId
- ID of the project of which to retrieve the issuesmaxExclusiveStatus
- all issues under this status will be returnedpublic Long countByProjectAndLowerStatus(Integer projectId, int maxExclusiveStatus)
IssueDAO
countByProjectAndLowerStatus
in interface IssueDAO
projectId
- ID of the project of which to count issuesmaxExclusiveStatus
- all issues under this status will be countedpublic List<Issue> findByProjectAndHigherStatus(Integer projectId, int status)
IssueDAO
findByProjectAndHigherStatus
in interface IssueDAO
projectId
- ID of the project of which to retrieve the issuesstatus
- all issues with this status or above will be returnedpublic Long countByProjectAndHigherStatus(Integer projectId, int minStatus)
IssueDAO
countByProjectAndHigherStatus
in interface IssueDAO
projectId
- ID of the project of which to count issuesminStatus
- all issues with this status or above will be countedpublic List<Issue> findByOwner(Integer ownerId, int maxExclusiveStatus)
IssueDAO
findByOwner
in interface IssueDAO
ownerId
- ID of the user who owns the issues to returnmaxExclusiveStatus
- status under which to return issuespublic List<Issue> findByOwnerInAvailableProjects(Integer ownerId, int maxExclusiveStatus)
IssueDAO
findByOwnerInAvailableProjects
in interface IssueDAO
ownerId
- ID of the user who owns the issues to returnmaxExclusiveStatus
- status under which to return issuespublic List<Issue> findUnassignedIssues(int maxStatus)
IssueDAO
findUnassignedIssues
in interface IssueDAO
maxStatus
- maximum status allowed for the issues to returnpublic List<Issue> findByCreator(Integer creatorId, int maxExclusiveStatus)
IssueDAO
findByCreator
in interface IssueDAO
maxExclusiveStatus
- all issues under this status will be returnedpublic List<Issue> findByCreatorInAvailableProjects(Integer creatorId, int maxExclusiveStatus)
IssueDAO
findByCreatorInAvailableProjects
in interface IssueDAO
maxExclusiveStatus
- all issues under this status will be returnedpublic List<Issue> findByNotification(Integer userId, int maxExclusiveStatus)
IssueDAO
Only 1 instance of every issue is returned, even if multiple notifications exist for an issue.
findByNotification
in interface IssueDAO
userId
- ID of the user with notifications for the issues to returnmaxExclusiveStatus
- all issues under this status will be returnedpublic List<Issue> findByNotificationInAvailableProjects(Integer userId, int maxExclusiveStatus)
IssueDAO
Only 1 instance of every issue is returned, even if multiple notifications exist for an issue.
findByNotificationInAvailableProjects
in interface IssueDAO
userId
- ID of the user with notifications for the issues to returnmaxExclusiveStatus
- all issues under this status will be returnedpublic List<Issue> findByComponent(Integer componentId)
IssueDAO
findByComponent
in interface IssueDAO
componentId
- ID of the component of which to retrieve all issuespublic Long countByComponent(Integer componentId)
IssueDAO
countByComponent
in interface IssueDAO
componentId
- ID of the componentpublic List<Issue> findByVersion(Integer versionId)
IssueDAO
findByVersion
in interface IssueDAO
versionId
- ID of the version of which to retrieve all issuespublic Long countByVersion(Integer versionId)
IssueDAO
countByVersion
in interface IssueDAO
versionId
- ID of the versionpublic Date latestModificationDate(Integer projectId)
IssueDAO
latestModificationDate
in interface IssueDAO
projectId
- ID of the project of which to retrieve the issuespublic List<Issue> findNextIssues(Integer issueId)
IssueDAO
findNextIssues
in interface IssueDAO
issueId
- the issue IDpublic List<Issue> findPreviousIssues(Integer issueId)
IssueDAO
findPreviousIssues
in interface IssueDAO
issueId
- the issue IDpublic List<Issue> query(IssueSearchQuery searchQuery, User user, Map<Integer,Set<PermissionType>> userPermissions)
public Collection<?> getProjectsObjects(IssueSearchQuery query)
public ProjectDAO getProjectDAO()
public void setProjectDAO(ProjectDAO projectDAO)
public List<Issue> findByTargetVersion(Integer versionId)
findByTargetVersion
in interface IssueDAO
versionId
- the version ID.Copyright © 2002–2019 itracker. All rights reserved.