Advertisement
Guest User

Untitled

a guest
Apr 25th, 2019
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. package ch.makery.address.model;
  2.  
  3. import java.io.Serializable;
  4. import java.io.ObjectInputStream;
  5. import java.time.LocalDate;
  6. import javafx.beans.property.IntegerProperty;
  7. import javafx.beans.property.SimpleIntegerProperty;
  8. import javafx.beans.property.SimpleStringProperty;
  9. import javafx.beans.property.StringProperty;
  10.  
  11. public class Dogovor implements Serializable {
  12. private static final long serialVersionUID = 123L;
  13.  
  14. transient private IntegerProperty nomerProperty;
  15. transient private StringProperty kontrProperty;
  16.  
  17. private int nomer;
  18. private String tip;
  19. private String kontr;
  20. private String otvl;
  21. private String form;
  22. private LocalDate data;
  23.  
  24. public Dogovor() {
  25. this.kontr = "";
  26. this.tip = "";
  27. this.otvl = "";
  28. this.nomer = -1;
  29. this.form = "";
  30. this.data = LocalDate.of(1999, 2, 21);
  31.  
  32. this.nomerProperty = new SimpleIntegerProperty(this.nomer);
  33. this.kontrProperty = new SimpleStringProperty(this.kontr);
  34. }
  35.  
  36. @Override
  37. private void readObject(ObjectInputStream in)
  38. throws IOException, ClassNotFoundException {
  39. in.defaultReadObject();
  40. this.nomerProperty = new SimpleIntegerProperty(this.nomer);
  41. this.kontrProperty = new SimpleStringProperty(this.kontr);
  42. }
  43.  
  44. public int getNomer() {
  45. return nomer;
  46. }
  47.  
  48. public void setNomer(int nomer) {
  49. this.nomerProperty.setValue(nomer);
  50. this.nomer = nomer;
  51. }
  52.  
  53. public String getTip() {
  54. return tip;
  55. }
  56.  
  57. public void setTip(String tip) {
  58. this.tip = tip;
  59. }
  60.  
  61. public String getKontr() {
  62. return kontr;
  63. }
  64.  
  65. public void setKontr(String kontr) {
  66. this.kontrProperty.setValue(kontr);
  67. this.kontr = kontr;
  68. }
  69.  
  70. public String getOtvl() {
  71. return otvl;
  72. }
  73.  
  74. public void setOtvl(String otvl) {
  75. this.otvl = otvl;
  76. }
  77.  
  78. public String getForm() {
  79. return form;
  80. }
  81.  
  82. public void setForm(String form) {
  83. this.form = form;
  84. }
  85.  
  86. public LocalDate getData() {
  87. return data;
  88. }
  89.  
  90. public void setData(LocalDate data) {
  91. this.data = data;
  92. }
  93.  
  94. public IntegerProperty getNomerProperty() {
  95. return nomerProperty;
  96. }
  97.  
  98. public StringProperty getKontrProperty() {
  99. return kontrProperty;
  100. }
  101. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement