Subversion Repositories SmartDukaan

Rev

Rev 23339 | Rev 23509 | 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;
23339 ashik.ali 4
import java.time.LocalDateTime;
22653 ashik.ali 5
 
6
import javax.persistence.Column;
7
import javax.persistence.Entity;
8
import javax.persistence.Id;
9
import javax.persistence.Table;
10
 
11
@Entity
22859 ashik.ali 12
@Table(name="fofo.scheme_in_out", schema = "fofo")
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
 
23345 ashik.ali 28
	@Column(name = "create_timestamp")
23339 ashik.ali 29
	private LocalDateTime createTimestamp = LocalDateTime.now();
30
 
22859 ashik.ali 31
	public int getSchemeId() {
32
		return schemeId;
22653 ashik.ali 33
	}
34
 
22859 ashik.ali 35
	public void setSchemeId(int schemeId) {
36
		this.schemeId = schemeId;
22653 ashik.ali 37
	}
38
 
22859 ashik.ali 39
	public int getInventoryItemId() {
40
		return inventoryItemId;
41
	}
42
 
43
	public void setInventoryItemId(int inventoryItemId) {
44
		this.inventoryItemId = inventoryItemId;
45
	}
46
 
22653 ashik.ali 47
	public float getAmount() {
48
		return amount;
49
	}
50
 
51
	public void setAmount(float amount) {
52
		this.amount = amount;
53
	}
23339 ashik.ali 54
 
55
	public LocalDateTime getCreateTimestamp() {
56
		return createTimestamp;
57
	}
58
 
59
	public void setCreateTimestamp(LocalDateTime createTimestamp) {
60
		this.createTimestamp = createTimestamp;
61
	}
22859 ashik.ali 62
 
22653 ashik.ali 63
	@Override
64
	public int hashCode() {
65
		final int prime = 31;
66
		int result = 1;
22859 ashik.ali 67
		result = prime * result + Float.floatToIntBits(amount);
23339 ashik.ali 68
		result = prime * result + ((createTimestamp == null) ? 0 : createTimestamp.hashCode());
22859 ashik.ali 69
		result = prime * result + inventoryItemId;
70
		result = prime * result + schemeId;
22653 ashik.ali 71
		return result;
72
	}
22859 ashik.ali 73
 
22653 ashik.ali 74
	@Override
75
	public boolean equals(Object obj) {
76
		if (this == obj)
77
			return true;
78
		if (obj == null)
79
			return false;
80
		if (getClass() != obj.getClass())
81
			return false;
22859 ashik.ali 82
		SchemeInOut other = (SchemeInOut) obj;
83
		if (Float.floatToIntBits(amount) != Float.floatToIntBits(other.amount))
22653 ashik.ali 84
			return false;
23339 ashik.ali 85
		if (createTimestamp == null) {
86
			if (other.createTimestamp != null)
87
				return false;
88
		} else if (!createTimestamp.equals(other.createTimestamp))
89
			return false;
22859 ashik.ali 90
		if (inventoryItemId != other.inventoryItemId)
91
			return false;
92
		if (schemeId != other.schemeId)
93
			return false;
22653 ashik.ali 94
		return true;
95
	}
96
 
97
	@Override
98
	public String toString() {
23339 ashik.ali 99
		return "SchemeInOut [schemeId=" + schemeId + ", inventoryItemId=" + inventoryItemId + ", amount=" + amount
100
				+ ", createTimestamp=" + createTimestamp + "]";
22653 ashik.ali 101
	}
22859 ashik.ali 102
 
22653 ashik.ali 103
}