TaskActivitiesDataService

public interface TaskActivitiesDataService extends MotechDataService<TaskActivity>

Data service for task activities.

Fields

ACTIVITY_TYPE

String ACTIVITY_TYPE

TASK

String TASK

Methods

byTask

List<TaskActivity> byTask(Long task)

Returns the list of activities for the given task id.

Parameters:
  • task – the id of the task, null returns empty list
Returns:

the list of matching task activities

byTaskAndActivityTypes

List<TaskActivity> byTaskAndActivityTypes(Long task, Set<TaskActivityType> activityTypes, QueryParams queryParams)

Returns the list of activities for the given task id, of specified type and with QueryParams for pagination support.

Parameters:
  • task – the id of the task
  • activityTypes – the set of activity types
  • queryParams – the query parameters to use
Returns:

the list of matching task activities

countByTaskAndActivityTypes

long countByTaskAndActivityTypes(Long task, Set<TaskActivityType> activityTypes)

Returns the count of activities for the given task id and of specified type.

Parameters:
  • task – the id of the task
  • activityTypes – the set of activity types
Returns:

the count of matching task activities