Advertisement
Guest User

Untitled

a guest
Jan 17th, 2019
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.65 KB | None | 0 0
  1.  
  2. package com.psk_project.car_rental.db;
  3.  
  4.  
  5.  
  6. public class Customer implements java.io.Serializable {
  7.  
  8. private int customerId = -1;
  9. private String name = "base";
  10. private String surname;
  11. private String pesel;
  12. private String phone;
  13. private String documentType;
  14. private String idNumber;
  15. private String place;
  16. private String address;
  17. private String postal;
  18. private String postOffice;
  19. private String remarks;
  20.  
  21.  
  22. public void update(Customer cust) {
  23. if (cust.name != null) name = cust.name;
  24. if (cust.surname != null) surname = cust.surname;
  25. if (cust.pesel != null) pesel = cust.pesel;
  26. if (cust.phone != null) phone = cust.phone;
  27. if (cust.documentType != null) documentType = cust.documentType;
  28. if (cust.idNumber != null) idNumber = cust.idNumber;
  29. if (cust.place != null) place = cust.place;
  30. if (cust.address != null) address = cust.address;
  31. if (cust.postal != null) postal = cust.postal;
  32. if (cust.postOffice != null) postOffice = cust.postOffice;
  33. if (cust.remarks != null) remarks = cust.remarks;
  34. }
  35.  
  36.  
  37. public int getCustomerId() { return customerId; }
  38.  
  39. public void setCustomerId(int customerId) { this.customerId = customerId; }
  40.  
  41. public String getName() { return name; }
  42.  
  43. public void setName(String name) { this.name = name; }
  44.  
  45. public String getSurname() { return surname; }
  46.  
  47. public void setSurname(String surname) { this.surname = surname; }
  48.  
  49. public String getPesel() { return pesel; }
  50.  
  51. public void setPesel(String pesel) { this.pesel = pesel; }
  52.  
  53. public String getPhone() { return phone; }
  54.  
  55. public void setPhone(String phone) { this.phone = phone; }
  56.  
  57. public String getDocumentType() { return documentType; }
  58.  
  59. public void setDocumentType(String documentType) { this.documentType = documentType; }
  60.  
  61. public String getIdNumber() { return idNumber; }
  62.  
  63. public void setIdNumber(String idNumber) { this.idNumber = idNumber; }
  64.  
  65. public String getPlace() { return place; }
  66.  
  67. public void setPlace(String place) { this.place = place; }
  68.  
  69. public String getAddress() { return address; }
  70.  
  71. public void setAddress(String address) { this.address = address; }
  72.  
  73. public String getPostal() { return postal; }
  74.  
  75. public void setPostal(String postal) { this.postal = postal; }
  76.  
  77. public String getPostOffice() { return postOffice; }
  78.  
  79. public void setPostOffice(String postOffice) { this.postOffice = postOffice; }
  80.  
  81. public String getRemarks() { return remarks; }
  82.  
  83. public void setRemarks(String remarks) { this.remarks = remarks;
  84. }
  85. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement