PageRenderTime 32ms CodeModel.GetById 0ms RepoModel.GetById 1ms app.codeStats 0ms

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

https://bitbucket.org/psjay/ants-bookbase
Java | 48 lines | 31 code | 11 blank | 6 comment | 0 complexity | 0c871b9537fdaa89742ff97f9ee78d55 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 CancleBorrowRequestNotification extends AbstractNotification {
  13. private BorrowRequest request;
  14. @JSONCreator
  15. public CancleBorrowRequestNotification(@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.getSharing().getUser();
  26. }
  27. @Override
  28. public Type getType() {
  29. return Type.CANCLE_BORROW_REQUEST;
  30. }
  31. public BorrowRequest getRequest() {
  32. return request;
  33. }
  34. public void setRequest(BorrowRequest request) {
  35. this.request = request;
  36. }
  37. }