Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @Entity
- public class Product {
- private Long id;
- private String sku;
- private String name;
- private BigDecimal price;
- private BigDecimal specialPrice;
- private BigInteger quantity;
- private BigInteger booked;
- private BigInteger ordered;
- private Set<Product> products;
- private List<Product> subProducts;
- public Product() {
- this.subProducts = new ArrayList<>();
- }
- @Id
- @GeneratedValue(strategy = GenerationType.IDENTITY)
- public Long getId() {
- return this.id;
- }
- public void setId(Long id) {
- this.id = id;
- }
- public String getSku() {
- return this.sku;
- }
- public void setSku(String sku) {
- this.sku = sku;
- }
- public String getName() {
- return this.name;
- }
- public void setName(String name) {
- this.name = name;
- }
- public BigDecimal getPrice() {
- return this.price;
- }
- public void setPrice(BigDecimal price) {
- this.price = price;
- }
- public BigDecimal getSpecialPrice() {
- return this.specialPrice;
- }
- public void setSpecialPrice(BigDecimal specialPrice) {
- this.specialPrice = specialPrice;
- }
- public BigInteger getQuantity() {
- return this.quantity;
- }
- public void setQuantity(BigInteger quantity) {
- this.quantity = quantity;
- }
- public BigInteger getBooked() {
- return this.booked;
- }
- public void setBooked(BigInteger booked) {
- this.booked = booked;
- }
- public BigInteger getOrdered() {
- return this.ordered;
- }
- public void setOrdered(BigInteger ordered) {
- this.ordered = ordered;
- }
- @ManyToMany(mappedBy = "products")
- public List<Product> getSubProducts() {
- return this.subProducts;
- }
- public void setSubProducts(List<Product> subProducts) {
- this.subProducts = subProducts;
- }
- @ManyToMany
- public Set<Product> getProducts() {
- return this.products;
- }
- public void setProducts(Set<Product> products) {
- this.products = products;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement