Guest User

Untitled

a guest
Jan 24th, 2017
295
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.63 KB | None | 0 0
  1. ublic class VisitContextModel {
  2.  
  3. private int id;
  4. private String uuid;
  5. private boolean active;
  6. private boolean admitted;
  7. private Long stopDatetimeInMilliseconds;
  8. private Long startDatetimeInMilliseconds;
  9. private VisitType visitType;
  10. private Date stopDatetime;
  11.  
  12. public VisitContextModel(VisitDomainWrapper visit) {
  13. this.id = visit.getVisitId();
  14. this.uuid = visit.getVisit().getUuid();
  15. this.active = visit.isOpen();
  16. this.admitted = visit.isAdmitted();
  17. this.startDatetimeInMilliseconds = visit.getStartDatetime().getTime();
  18. this.visitType = ConversionUtil.convertToRepresentation(visit.getVisit().getVisitType(), Representation.DEFAULT);
  19. Date stopDatetime = visit.getStopDatetime();
  20. this.stopDatetime = stopDatetime;
  21.  
  22. if(stopDatetime!=null){
  23. this.stopDatetimeInMilliseconds = stopDatetime.getTime();
  24. }else{
  25. this.stopDatetimeInMilliseconds = null;
  26. }
  27.  
  28. }
  29.  
  30. public int getId() {
  31. return id;
  32. }
  33.  
  34. public String getUuid() {
  35. return uuid;
  36. }
  37.  
  38. public boolean isActive() {
  39. return active;
  40. }
  41.  
  42. public boolean isAdmitted() {
  43. return admitted;
  44. }
  45. //VisitType getter
  46. public VisitType getVisitType() {
  47. return visitType;
  48. }
  49.  
  50.  
  51. public Long getStopDatetimeInMilliseconds(){
  52. return stopDatetimeInMilliseconds;
  53. }
  54.  
  55. public Long getStartDatetimeInMilliseconds(){
  56. return startDatetimeInMilliseconds;
  57. }
  58.  
  59. public Date getStopDatetime() {
  60. return stopDatetime;
  61. }
  62. }
Advertisement
Add Comment
Please, Sign In to add comment