Subversion Repositories SmartDukaan

Rev

Rev 21710 | Rev 21895 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
21714 ashik.ali 1
package com.spice.profitmandi.dao.entity.fofo;
21596 ashik.ali 2
 
3
import java.io.Serializable;
21687 ashik.ali 4
import java.util.Set;
21596 ashik.ali 5
 
21687 ashik.ali 6
import javax.persistence.CascadeType;
21596 ashik.ali 7
import javax.persistence.Column;
8
import javax.persistence.Entity;
21687 ashik.ali 9
import javax.persistence.FetchType;
21596 ashik.ali 10
import javax.persistence.GeneratedValue;
11
import javax.persistence.GenerationType;
12
import javax.persistence.Id;
21687 ashik.ali 13
import javax.persistence.JoinColumn;
21596 ashik.ali 14
import javax.persistence.NamedQueries;
15
import javax.persistence.NamedQuery;
21687 ashik.ali 16
import javax.persistence.OneToMany;
21596 ashik.ali 17
import javax.persistence.Table;
18
import javax.persistence.UniqueConstraint;
19
 
20
@Entity
21
@Table(name="fofo.fofo_line_item", schema = "fofo", uniqueConstraints = {@UniqueConstraint(columnNames = {"order_id","item_id"})})
22
@NamedQueries({
23
	@NamedQuery(name = "FofoLineItem.selectById", query = "select fli from FofoLineItem fli where fli.id = :id"),
24
	@NamedQuery(name="FofoLineItem.selectByOrderId",query="select fli from FofoLineItem fli where fli.orderId = :orderId")
25
})
26
public class FofoLineItem implements Serializable{
27
 
28
	private static final long serialVersionUID = 1L;
29
 
30
	@Id
31
	@Column(name = "id")
32
	@GeneratedValue(strategy = GenerationType.IDENTITY)
33
	private int id;
34
 
35
	@Column(name = "order_id")
36
	private int orderId;
37
 
38
	@Column(name = "item_id")
39
	private int itemId;
40
 
41
	@Column(name = "quantity")
42
	private int quantity;
43
 
44
	@Column(name = "selling_price")
45
	private float sellingPrice;
46
 
21710 ashik.ali 47
	@Column(name = "cost")
48
	private float cost;
49
 
21687 ashik.ali 50
	@Column(name = "tax_rate")
51
	private float taxRate;
52
 
21596 ashik.ali 53
	@Column(name = "tax")
54
	private float tax;
55
 
56
	@Column(name = "dp")
57
	private float dp;
58
 
59
	@Column(name = "brand")
60
	private String brand;
61
 
62
	@Column(name = "model_name")
63
	private String modelName;
64
 
65
	@Column(name = "model_number")
66
	private String modelNumber;
67
 
68
	@Column(name = "color")
69
	private String color;
70
 
21687 ashik.ali 71
	@OneToMany(cascade=CascadeType.ALL,fetch=FetchType.LAZY)
72
	@JoinColumn(name="fofo_line_item_id",insertable=false,updatable=false,nullable=false)
73
	private Set<FofoLineItemSerialNumber> fofoLineItemSerialNumbers;
21596 ashik.ali 74
 
75
	public int getId() {
76
		return id;
77
	}
78
	public void setId(int id) {
79
		this.id = id;
80
	}
81
	public int getOrderId() {
82
		return orderId;
83
	}
84
	public void setOrderId(int orderId) {
85
		this.orderId = orderId;
86
	}
87
	public int getItemId() {
88
		return itemId;
89
	}
90
	public void setItemId(int itemId) {
91
		this.itemId = itemId;
92
	}
93
	public int getQuantity() {
94
		return quantity;
95
	}
96
	public void setQuantity(int quantity) {
97
		this.quantity = quantity;
98
	}
99
	public float getSellingPrice() {
100
		return sellingPrice;
101
	}
102
	public void setSellingPrice(float sellingPrice) {
103
		this.sellingPrice = sellingPrice;
104
	}
21710 ashik.ali 105
 
106
	public float getCost() {
107
		return cost;
108
	}
109
	public void setCost(float cost) {
110
		this.cost = cost;
111
	}
112
 
21596 ashik.ali 113
	public float getTax() {
114
		return tax;
115
	}
116
	public void setTax(float tax) {
117
		this.tax = tax;
118
	}
21687 ashik.ali 119
	public float getTaxRate() {
120
		return taxRate;
121
	}
122
	public void setTaxRate(float taxRate) {
123
		this.taxRate = taxRate;
124
	}
21596 ashik.ali 125
	public float getDp() {
126
		return dp;
127
	}
128
	public void setDp(float dp) {
129
		this.dp = dp;
130
	}
131
	public String getBrand() {
132
		return brand;
133
	}
134
	public void setBrand(String brand) {
135
		this.brand = brand;
136
	}
137
	public String getModelName() {
138
		return modelName;
139
	}
140
	public void setModelName(String modelName) {
141
		this.modelName = modelName;
142
	}
143
	public String getModelNumber() {
144
		return modelNumber;
145
	}
146
	public void setModelNumber(String modelNumber) {
147
		this.modelNumber = modelNumber;
148
	}
149
	public String getColor() {
150
		return color;
151
	}
152
	public void setColor(String color) {
153
		this.color = color;
154
	}
21687 ashik.ali 155
 
156
	public Set<FofoLineItemSerialNumber> getFofoLineItemSerialNumbers() {
157
		return fofoLineItemSerialNumbers;
158
	}
159
	public void setFofoLineItemSerialNumbers(Set<FofoLineItemSerialNumber> fofoLineItemSerialNumbers) {
160
		this.fofoLineItemSerialNumbers = fofoLineItemSerialNumbers;
161
	}
21602 ashik.ali 162
	@Override
163
	public String toString() {
164
		return "FofoLineItem [id=" + id + ", orderId=" + orderId + ", itemId=" + itemId + ", quantity=" + quantity
165
				+ ", sellingPrice=" + sellingPrice + ", tax=" + tax + ", dp=" + dp + ", brand=" + brand + ", modelName="
166
				+ modelName + ", modelNumber=" + modelNumber + ", color=" + color + "]";
167
	}
168
 
169
 
21596 ashik.ali 170
}