Guest User

Untitled

a guest
Jul 26th, 2017
109
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. @Entity
  2. public class Product {
  3.  
  4. private Long id;
  5. private String sku;
  6. private String name;
  7. private BigDecimal price;
  8. private BigDecimal specialPrice;
  9. private BigInteger quantity;
  10. private BigInteger booked;
  11. private BigInteger ordered;
  12. private Set<Product> products;
  13. private List<Product> subProducts;
  14.  
  15. public Product() {
  16. this.subProducts = new ArrayList<>();
  17. }
  18.  
  19. @Id
  20. @GeneratedValue(strategy = GenerationType.IDENTITY)
  21. public Long getId() {
  22. return this.id;
  23. }
  24.  
  25. public void setId(Long id) {
  26. this.id = id;
  27. }
  28.  
  29. public String getSku() {
  30. return this.sku;
  31. }
  32.  
  33. public void setSku(String sku) {
  34. this.sku = sku;
  35. }
  36.  
  37. public String getName() {
  38. return this.name;
  39. }
  40.  
  41. public void setName(String name) {
  42. this.name = name;
  43. }
  44.  
  45. public BigDecimal getPrice() {
  46. return this.price;
  47. }
  48.  
  49. public void setPrice(BigDecimal price) {
  50. this.price = price;
  51. }
  52.  
  53. public BigDecimal getSpecialPrice() {
  54. return this.specialPrice;
  55. }
  56.  
  57. public void setSpecialPrice(BigDecimal specialPrice) {
  58. this.specialPrice = specialPrice;
  59. }
  60.  
  61. public BigInteger getQuantity() {
  62. return this.quantity;
  63. }
  64.  
  65. public void setQuantity(BigInteger quantity) {
  66. this.quantity = quantity;
  67. }
  68.  
  69. public BigInteger getBooked() {
  70. return this.booked;
  71. }
  72.  
  73. public void setBooked(BigInteger booked) {
  74. this.booked = booked;
  75. }
  76.  
  77. public BigInteger getOrdered() {
  78. return this.ordered;
  79. }
  80.  
  81. public void setOrdered(BigInteger ordered) {
  82. this.ordered = ordered;
  83. }
  84.  
  85. @ManyToMany(mappedBy = "products")
  86. public List<Product> getSubProducts() {
  87. return this.subProducts;
  88. }
  89.  
  90. public void setSubProducts(List<Product> subProducts) {
  91. this.subProducts = subProducts;
  92. }
  93.  
  94. @ManyToMany
  95. public Set<Product> getProducts() {
  96. return this.products;
  97. }
  98.  
  99. public void setProducts(Set<Product> products) {
  100. this.products = products;
  101. }
  102. }
RAW Paste Data