public interface TodoDao extends com.whitestein.lsps.common.BasicDao<Todo,Long>
Todo.| Modifier and Type | Method and Description |
|---|---|
void |
add(Todo todo)
Adds todo to the persistent store.
|
void |
add(TodoEscalation todoEscalation)
Adds todo escalation to the persistent store.
|
Long |
countLockedTodos(Person person,
TodoListCriteria criteria)
Returns number of todos locked by user
|
Long |
countTodos(Person person,
TodoListCriteria criteria,
boolean unlockedOnly)
Returns number of todos visible to user, but not locked by user (if unlockedOnly is true).
|
Collection<String> |
findAllOnBehalfOf(Todo todo,
Person person)
Returns the set ids of users on behalf of which the given person sees
the to-do in his to-do list.
|
QueryResult<Todo> |
findByCriteria(TodoCriteria criteria)
Returns todos which fulfill the given criteria.
|
Long |
findTodoIdByTask(long modelInstanceId,
long taskId)
Finds todo id associated with a task.
|
QueryResult<Todo> |
getPersonalTodoList(Person person,
PagingCriteria criteria)
Returns
person's personal todo list (all todos currently locked
by given person), according to given paging criteria,
sorted by todo priority and issued date. |
Map<TodoStatus,Long> |
getStatusCounts()
Returns a map of to-do counts grouped by the status.
|
Todo |
getTodo(long todoId)
Returns the todo identified by the given
todoId argument. |
Todo |
getTodoAndLock(long todoId)
Returns the todo identified by the given
todoId argument and
locks it. |
QueryResult<Todo> |
getTodoList(Person person,
TodoListCriteria criteria)
Returns
person's todo list, according to given paging criteria. |
List<Todo> |
getTodoListForOrphanedCheck(Person person,
Set<RoleUnitName> removedRoles)
Returns list of todos for which a value "isOrphaned" must be recalculated.
|
long[] |
getTodoListIds(Person person,
TodoListCriteria criteria)
Returns
person's todo list ids, according to given paging criteria. |
boolean |
isUserRejected(long todoId,
String personId)
Returns true if a todo is rejected by a user.
|
void |
remove(TodoPerformer performer)
Removes todo performer.
|
void |
remove(TodoRejection todoRejection)
Removes todo-rejection from the persistent store.
|
void |
updateTodoAllocatedTo(Todo todo,
Person allocatedTo)
Updates todo's allocated-to field according to given
allocatedTo
person parameter. |
static final String NAME
void add(Todo todo)
todo - todovoid add(TodoEscalation todoEscalation)
todoEscalation - void remove(TodoRejection todoRejection)
todoRejection - void remove(TodoPerformer performer)
performer - QueryResult<Todo> findByCriteria(TodoCriteria criteria)
criteria - criteria for searchingTodo getTodo(long todoId)
todoId argument.todoId - todo idTodo getTodoAndLock(long todoId)
todoId argument and
locks it.todoId - todo idCollection<String> findAllOnBehalfOf(Todo todo, Person person)
todo - person - Map<TodoStatus,Long> getStatusCounts()
void updateTodoAllocatedTo(Todo todo, Person allocatedTo)
allocatedTo
person parameter.todo - allocatedTo - QueryResult<Todo> getPersonalTodoList(Person person, PagingCriteria criteria)
person's personal todo list (all todos currently locked
by given person), according to given paging criteria,
sorted by todo priority and issued date.person - the person entitycriteria - the paging criteriaQueryResult containing part of result data corresponding
to the paging criteria and the total count of todos in the result
listlong[] getTodoListIds(Person person, TodoListCriteria criteria)
person's todo list ids, according to given paging criteria.person - the person entitycriteria - the paging criteriaQueryResult<Todo> getTodoList(Person person, TodoListCriteria criteria)
person's todo list, according to given paging criteria.person - the person entitycriteria - the paging criteriaQueryResult containing part of result data corresponding
to the paging criteria and the total count of todos in the result
listList<Todo> getTodoListForOrphanedCheck(Person person, Set<RoleUnitName> removedRoles)
person - removedRoles - Long countTodos(Person person, TodoListCriteria criteria, boolean unlockedOnly)
getTodoList(Person, TodoListCriteria).total - getPersonalTodoList(Person, PagingCriteria).total.
If unlocked only is false, returns getTodoList(Person, TodoListCriteria).totalperson - criteria - unlockedOnly - if true only unlocked todos will be countedLong countLockedTodos(Person person, TodoListCriteria criteria)
person - criteria - Long findTodoIdByTask(long modelInstanceId, long taskId)
modelInstanceId - taskId - boolean isUserRejected(long todoId,
String personId)
todoId - personId - Copyright © 2007-2020 Whitestein Technologies. All Rights Reserved.