Subversion Repositories SmartDukaan

Rev

Rev 22859 | Rev 23339 | 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")
12
public class SchemeInOut implements Serializable{
22653 ashik.ali 13
 
14
	private static final long serialVersionUID = 1L;
22859 ashik.ali 15
 
16
	@Id
17
	@Column(name = "scheme_id")
18
	private int schemeId;
22653 ashik.ali 19
 
20
	@Id
22859 ashik.ali 21
	@Column(name = "inventory_item_id")
22
	private int inventoryItemId;
22653 ashik.ali 23
 
24
	@Column(name = "amount")
25
	private float amount;
26
 
22859 ashik.ali 27
	public int getSchemeId() {
28
		return schemeId;
22653 ashik.ali 29
	}
30
 
22859 ashik.ali 31
	public void setSchemeId(int schemeId) {
32
		this.schemeId = schemeId;
22653 ashik.ali 33
	}
34
 
22859 ashik.ali 35
	public int getInventoryItemId() {
36
		return inventoryItemId;
37
	}
38
 
39
	public void setInventoryItemId(int inventoryItemId) {
40
		this.inventoryItemId = inventoryItemId;
41
	}
42
 
22653 ashik.ali 43
	public float getAmount() {
44
		return amount;
45
	}
46
 
47
	public void setAmount(float amount) {
48
		this.amount = amount;
49
	}
22859 ashik.ali 50
 
22653 ashik.ali 51
	@Override
52
	public int hashCode() {
53
		final int prime = 31;
54
		int result = 1;
22859 ashik.ali 55
		result = prime * result + Float.floatToIntBits(amount);
56
		result = prime * result + inventoryItemId;
57
		result = prime * result + schemeId;
22653 ashik.ali 58
		return result;
59
	}
22859 ashik.ali 60
 
22653 ashik.ali 61
	@Override
62
	public boolean equals(Object obj) {
63
		if (this == obj)
64
			return true;
65
		if (obj == null)
66
			return false;
67
		if (getClass() != obj.getClass())
68
			return false;
22859 ashik.ali 69
		SchemeInOut other = (SchemeInOut) obj;
70
		if (Float.floatToIntBits(amount) != Float.floatToIntBits(other.amount))
22653 ashik.ali 71
			return false;
22859 ashik.ali 72
		if (inventoryItemId != other.inventoryItemId)
73
			return false;
74
		if (schemeId != other.schemeId)
75
			return false;
22653 ashik.ali 76
		return true;
77
	}
78
 
79
	@Override
80
	public String toString() {
22859 ashik.ali 81
		return "SchemeInOut [schemeId=" + schemeId + ", inventoryItemId=" + inventoryItemId + ", amount=" + amount + "]";
22653 ashik.ali 82
	}
22859 ashik.ali 83
 
22653 ashik.ali 84
}