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

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

https://bitbucket.org/psjay/ants-bookbase
Java | 52 lines | 32 code | 13 blank | 7 comment | 0 complexity | e236de492fc99c1d9cee630e0168e618 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 AcceptBorrowRequestToOtherNotification extends
  13. AbstractNotification {
  14. private BorrowRequest request;
  15. @JSONCreator
  16. public AcceptBorrowRequestToOtherNotification(@JSONField(name = "request") BorrowRequest request) {
  17. this.request = request;
  18. }
  19. @Override
  20. public String toHTML() {
  21. // TODO Auto-generated method stub
  22. return null;
  23. }
  24. @Override
  25. public User getOwner() {
  26. return request.getUser();
  27. }
  28. @Override
  29. public Type getType() {
  30. return Type.ACCEPT_BORROW_REQUEST_TO_OTHER;
  31. }
  32. // setters and getters
  33. public BorrowRequest getRequest() {
  34. return request;
  35. }
  36. public void setRequest(BorrowRequest request) {
  37. this.request = request;
  38. }
  39. }