PageRenderTime 8839ms CodeModel.GetById 0ms RepoModel.GetById 0ms app.codeStats 0ms

/src/com/jieshuhuiyou/entity/notifications/RejectBorrowRequestNotification.java

https://bitbucket.org/psjay/ants-bookbase
Java | 53 lines | 31 code | 15 blank | 7 comment | 0 complexity | 6ceb028b5cb1c0d9ebc2e45ccd66e80d MD5 | raw file
  1. package com.jieshuhuiyou.entity.notifications;
  2. import com.alibaba.fastjson.annotation.JSONCreator;
  3. import com.alibaba.fastjson.annotation.JSONField;
  4. import com.jieshuhuiyou.entity.BorrowRequest;
  5. import com.jieshuhuiyou.entity.Notification.Type;
  6. import com.jieshuhuiyou.entity.User;
  7. /**
  8. * ?????????
  9. * @author PSJay
  10. *
  11. */
  12. public class RejectBorrowRequestNotification extends AbstractNotification {
  13. private BorrowRequest request;
  14. @JSONCreator
  15. public RejectBorrowRequestNotification(@JSONField(name = "request") BorrowRequest request) {
  16. this.request = request;
  17. }
  18. @Override
  19. public String toHTML() {
  20. // TODO Auto-generated method stub
  21. return null;
  22. }
  23. @Override
  24. public User getOwner() {
  25. return request.getUser();
  26. }
  27. @Override
  28. public Type getType() {
  29. return Type.REJECT_BORROW_REQEUST;
  30. }
  31. // setters and getters
  32. public BorrowRequest getRequest() {
  33. return request;
  34. }
  35. public void setRequest(BorrowRequest request) {
  36. this.request = request;
  37. }
  38. }