Subversion Repositories SmartDukaan

Rev

Rev 22653 | Rev 23297 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

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