Added comments and changed default sorting for actions.

This commit is contained in:
Kai Zimmermann
2016-03-03 20:46:50 +01:00
parent e7173aa846
commit 794db18673
3 changed files with 31 additions and 22 deletions

View File

@@ -21,38 +21,47 @@ import org.springframework.transaction.annotation.Transactional;
/**
* {@link ActionStatus} repository.
*
*
*
*
*/
@Transactional(readOnly = true)
public interface ActionStatusRepository
extends BaseEntityRepository<ActionStatus, Long>, JpaSpecificationExecutor<ActionStatus> {
/**
* @param target
* Counts {@link ActionStatus} entries of given {@link Action} in
* repository.
*
* @param action
* @return
* to count status entries
* @return number of actions in repository
*/
Long countByAction(Action action);
/**
* Counts {@link ActionStatus} entries of given {@link Action} with given
* {@link Status} in repository.
*
* @param action
* @param retrieved
* @return
* to count status entries
* @param status
* to filter for
* @return number of actions in repository
*/
Long countByActionAndStatus(Action action, Status retrieved);
Long countByActionAndStatus(Action action, Status status);
/**
* Retrieves all {@link ActionStatus} entries from repository of given
* {@link Action}.
*
* @param pageReq
* parameters
* @param action
* @return
* of the status entries
* @return pages list of {@link ActionStatus} entries
*/
Page<ActionStatus> findByAction(Pageable pageReq, Action action);
/**
* Finds all status updates for the defined action and target order by
* {@link ActionStatus#getId()} desc including
* Finds all status updates for the defined action and target including
* {@link ActionStatus#getMessages()}.
*
* @param pageReq