daily pastebin goal
12%
SHARE
TWEET

Untitled

a guest Jan 24th, 2018 55 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. public class Item {
  2. private IntegerProperty item_id;
  3. private StringProperty name;
  4. private DoubleProperty bail;
  5. private DoubleProperty rentalprice;
  6. private IntegerProperty count;
  7.  
  8. public Item(int item_id, String name, double bail, double rentalprice, int count) {
  9.     this.item_id = new SimpleIntegerProperty(item_id);
  10.     this.name = new SimpleStringProperty(name);
  11.     this.bail = new SimpleDoubleProperty(bail);
  12.     this.rentalprice = new SimpleDoubleProperty(rentalprice);
  13.     this.count = new SimpleIntegerProperty(count);
  14. }
  15.  
  16. public int getItem_id() {
  17.     return item_id.get();
  18. }
  19.  
  20. public IntegerProperty item_idProperty() {
  21.     return item_id;
  22. }
  23.  
  24. public void setItem_id(int item_id) {
  25.     this.item_id.set(item_id);
  26. }
  27.  
  28. public String getName() {
  29.     return name.get();
  30. }
  31.  
  32. public StringProperty nameProperty() {
  33.     return name;
  34. }
  35.  
  36. public void setName(String name) {
  37.     this.name.set(name);
  38. }
  39.  
  40. public double getBail() {
  41.     return bail.get();
  42. }
  43.  
  44. public DoubleProperty bailProperty() {
  45.     return bail;
  46. }
  47.  
  48. public void setBail(double bail) {
  49.     this.bail.set(bail);
  50. }
  51.  
  52. public double getRentalprice() {
  53.     return rentalprice.get();
  54. }
  55.  
  56. public DoubleProperty rentalpriceProperty() {
  57.     return rentalprice;
  58. }
  59.  
  60. public void setRentalprice(double rentalprice) {
  61.     this.rentalprice.set(rentalprice);
  62. }
  63.  
  64. public int getCount() {
  65.     return count.get();
  66. }
  67.  
  68. public IntegerProperty countProperty() {
  69.     return count;
  70. }
  71.  
  72. public void setCount(int count) {
  73.     this.count.set(count);
  74. }
  75.    
  76. @Entity
  77. @Table(name = "item", schema = "appdb")
  78. public class ItemEntity {
  79. private int item_id;
  80. private String name;
  81. private double bail;
  82. private double rentalprice;
  83. private int count;
  84.  
  85. private List<ClientEntity> clientList;
  86.  
  87. @Id
  88. @GeneratedValue(strategy = GenerationType.IDENTITY)
  89. @Column(name = "item_id", nullable = false)
  90. public int getItem_id() {
  91.     return item_id;
  92. }
  93.  
  94. public void setItem_id(int item_id) {
  95.     this.item_id = item_id;
  96. }
  97.  
  98. @Basic
  99. @Column(name = "name", nullable = false)
  100. public String getName() {
  101.     return name;
  102. }
  103.  
  104. public void setName(String name) {
  105.     this.name = name;
  106. }
  107.  
  108. @Basic
  109. @Column(name = "bail", nullable = false)
  110. public double getBail() {
  111.     return bail;
  112. }
  113.  
  114. public void setBail(double bail) {
  115.     this.bail = bail;
  116. }
  117.  
  118. @Basic
  119. @Column(name = "rentalprice", nullable = false)
  120. public double getRentalprice() {
  121.     return rentalprice;
  122. }
  123.  
  124. public void setRentalprice(double rentalprice) {
  125.     this.rentalprice = rentalprice;
  126. }
  127.  
  128. @Basic
  129. @Column(name = "count", nullable = false)
  130. public int getCount() {
  131.     return count;
  132. }
  133.  
  134. public void setCount(int count) {
  135.     this.count = count;
  136. }
  137.  
  138. @ManyToMany(mappedBy = "itemList")
  139. public List<ClientEntity> getClientList() {
  140.     return clientList;
  141. }
  142.  
  143. public void setClientList(List<ClientEntity> clientList) {
  144.     this.clientList = clientList;
  145. }
RAW Paste Data
Top