BrightSide Workbench Full Report + Source Code
ProductRegulation.java
Go to the documentation of this file.
1 /*
2  * TurrĂ³ i Cutiller Foundation. License notice.
3  * Copyright (C) 2016 Lluis TurrĂ³ Cutiller <http://www.turro.org/>
4  *
5  * This program is free software: you can redistribute it and/or modify
6  * it under the terms of the GNU Affero General Public License as published by
7  * the Free Software Foundation, either version 3 of the License, or
8  * (at your option) any later version.
9  *
10  * This program is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13  * GNU Affero General Public License for more details.
14  *
15  * You should have received a copy of the GNU Affero General Public License
16  * along with this program. If not, see <http://www.gnu.org/licenses/>.
17  */
18 
19 package org.turro.financials.entity;
20 
21 import java.util.Date;
22 import javax.persistence.Column;
23 import javax.persistence.Entity;
24 import javax.persistence.GeneratedValue;
25 import javax.persistence.GenerationType;
26 import javax.persistence.Id;
27 import javax.persistence.ManyToOne;
28 import javax.persistence.Temporal;
29 import javax.persistence.TemporalType;
30 
35 @Entity
36 public class ProductRegulation implements java.io.Serializable {
37 
38  @Id
39  @GeneratedValue(strategy=GenerationType.IDENTITY)
40  @Column(name="IDENTIFIER")
41  private long id;
42 
43  @Column(nullable=false)
44  @Temporal(value = TemporalType.DATE)
45  private Date regulationDate;
46 
47  @ManyToOne
48  private Contract store;
49 
50  @ManyToOne
51  private Product product;
52 
53  private RegulationType type;
54 
55  private double quantity;
56 
57  public long getId() {
58  return id;
59  }
60 
61  public void setId(long id) {
62  this.id = id;
63  }
64 
65  public Date getRegulationDate() {
66  return regulationDate;
67  }
68 
69  public void setRegulationDate(Date regulationDate) {
70  this.regulationDate = regulationDate;
71  }
72 
73  public Contract getStore() {
74  return store;
75  }
76 
77  public void setStore(Contract store) {
78  this.store = store;
79  }
80 
81  public Product getProduct() {
82  return product;
83  }
84 
85  public void setProduct(Product product) {
86  this.product = product;
87  }
88 
90  return type;
91  }
92 
93  public void setType(RegulationType type) {
94  this.type = type;
95  }
96 
97  public double getQuantity() {
98  return quantity;
99  }
100 
101  public void setQuantity(double quantity) {
102  this.quantity = quantity;
103  }
104 
105 }