Advertisement
akakunin

PetServiceImpl.java

Dec 7th, 2016
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.15 KB | None | 0 0
  1. /**
  2. * возращает кол-во объектов на сайте с заданным статусом если @param status
  3. * равен WorkflowConstants.STATUS_ANY - то работает как countByGroup
  4. */
  5. @Override
  6. public int countByGroupStatus(long groupId, int status) throws SystemException {
  7. if (status == WorkflowConstants.STATUS_ANY) {
  8. return petPersistence.filterCountByGroup(groupId);
  9. } else {
  10. return petPersistence.filterCountByGroupStatus(groupId, status);
  11. }
  12. }
  13.  
  14. /**
  15. * возращает объекты сайта с заданным статусом если @param status равен
  16. * WorkflowConstants.STATUS_ANY - то работает как getByGroup
  17. */
  18. @Override
  19. public List<Pet> getByGroupStatus(long groupId, int status, int start, int end) throws SystemException {
  20. if (status == WorkflowConstants.STATUS_ANY) {
  21. return petPersistence.filterFindByGroup(groupId, start, end);
  22. } else {
  23. return petPersistence.filterFindByGroupStatus(groupId, status, start, end);
  24. }
  25. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement