1 package org.itracker.persistence.dao;
2
3 import org.itracker.model.IssueActivity;
4
5 import java.util.List;
6
7 public interface IssueActivityDAO extends BaseDAO<IssueActivity> {
8
9 /**
10 * Finds the activity with the given ID.
11 *
12 * @param activityId system ID of the activity to return
13 * @return activity instance of <tt>null</tt> if none exists
14 */
15 IssueActivity findById(Integer activityId);
16
17 /**
18 * Finds all activities of a given Issue.
19 * <p/>
20 * TODO : rename to findByIssue()
21 *
22 * @param issueId system ID of the issue of which to retrieve activities
23 * @return list of activities of the issue, in unspecified order
24 */
25 List<IssueActivity> findByIssueId(Integer issueId);
26
27 /**
28 * Finds all activities for an Issue with the given notification status.
29 *
30 * @param issueId system ID of the issue of which to retrieve activities
31 * @param notificationSent whether to return activities for which
32 * a notification has been sent or not
33 */
34 List<IssueActivity> findByIssueIdAndNotification(Integer issueId,
35 boolean notificationSent);
36
37
38 }