Subversion Repositories SmartDukaan

Rev

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

Rev Author Line No. Line
22653 ashik.ali 1
package com.spice.profitmandi.dao.entity.fofo;
2
 
3
import java.io.Serializable;
4
 
5
import javax.persistence.Column;
6
import javax.persistence.Entity;
7
import javax.persistence.Id;
8
import javax.persistence.Table;
9
 
10
@Entity
22859 ashik.ali 11
@Table(name="fofo.scheme_in_out", schema = "fofo")
22653 ashik.ali 12
 
22859 ashik.ali 13
public class SchemeInOut implements Serializable{
22653 ashik.ali 14
 
15
	private static final long serialVersionUID = 1L;
22859 ashik.ali 16
 
17
	@Id
18
	@Column(name = "scheme_id")
19
	private int schemeId;
22653 ashik.ali 20
 
21
	@Id
22859 ashik.ali 22
	@Column(name = "inventory_item_id")
23
	private int inventoryItemId;
22653 ashik.ali 24
 
25
	@Column(name = "amount")
26
	private float amount;
27
 
22859 ashik.ali 28
	public int getSchemeId() {
29
		return schemeId;
22653 ashik.ali 30
	}
31
 
22859 ashik.ali 32
	public void setSchemeId(int schemeId) {
33
		this.schemeId = schemeId;
22653 ashik.ali 34
	}
35
 
22859 ashik.ali 36
	public int getInventoryItemId() {
37
		return inventoryItemId;
38
	}
39
 
40
	public void setInventoryItemId(int inventoryItemId) {
41
		this.inventoryItemId = inventoryItemId;
42
	}
43
 
22653 ashik.ali 44
	public float getAmount() {
45
		return amount;
46
	}
47
 
48
	public void setAmount(float amount) {
49
		this.amount = amount;
50
	}
22859 ashik.ali 51
 
22653 ashik.ali 52
	@Override
53
	public int hashCode() {
54
		final int prime = 31;
55
		int result = 1;
22859 ashik.ali 56
		result = prime * result + Float.floatToIntBits(amount);
57
		result = prime * result + inventoryItemId;
58
		result = prime * result + schemeId;
22653 ashik.ali 59
		return result;
60
	}
22859 ashik.ali 61
 
22653 ashik.ali 62
	@Override
63
	public boolean equals(Object obj) {
64
		if (this == obj)
65
			return true;
66
		if (obj == null)
67
			return false;
68
		if (getClass() != obj.getClass())
69
			return false;
22859 ashik.ali 70
		SchemeInOut other = (SchemeInOut) obj;
71
		if (Float.floatToIntBits(amount) != Float.floatToIntBits(other.amount))
22653 ashik.ali 72
			return false;
22859 ashik.ali 73
		if (inventoryItemId != other.inventoryItemId)
74
			return false;
75
		if (schemeId != other.schemeId)
76
			return false;
22653 ashik.ali 77
		return true;
78
	}
79
 
80
	@Override
81
	public String toString() {
22859 ashik.ali 82
		return "SchemeInOut [schemeId=" + schemeId + ", inventoryItemId=" + inventoryItemId + ", amount=" + amount + "]";
22653 ashik.ali 83
	}
22859 ashik.ali 84
 
22653 ashik.ali 85
}