Subversion Repositories SmartDukaan

Rev

Rev 23509 | Rev 23968 | 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
 
23509 amit.gupta 31
	@Column(name = "rolled_back_timestamp")
23527 ashik.ali 32
	private LocalDateTime rolledBackTimestamp;
23509 amit.gupta 33
 
22859 ashik.ali 34
	public int getSchemeId() {
35
		return schemeId;
22653 ashik.ali 36
	}
37
 
22859 ashik.ali 38
	public void setSchemeId(int schemeId) {
39
		this.schemeId = schemeId;
22653 ashik.ali 40
	}
41
 
22859 ashik.ali 42
	public int getInventoryItemId() {
43
		return inventoryItemId;
44
	}
45
 
46
	public void setInventoryItemId(int inventoryItemId) {
47
		this.inventoryItemId = inventoryItemId;
48
	}
49
 
22653 ashik.ali 50
	public float getAmount() {
51
		return amount;
52
	}
53
 
54
	public void setAmount(float amount) {
55
		this.amount = amount;
56
	}
23339 ashik.ali 57
 
58
	public LocalDateTime getCreateTimestamp() {
59
		return createTimestamp;
60
	}
61
 
62
	public void setCreateTimestamp(LocalDateTime createTimestamp) {
63
		this.createTimestamp = createTimestamp;
64
	}
23527 ashik.ali 65
 
66
	public LocalDateTime getRolledBackTimestamp() {
67
		return rolledBackTimestamp;
68
	}
69
 
70
	public void setRolledBackTimestamp(LocalDateTime rolledBackTimestamp) {
71
		this.rolledBackTimestamp = rolledBackTimestamp;
72
	}
22859 ashik.ali 73
 
22653 ashik.ali 74
	@Override
75
	public int hashCode() {
76
		final int prime = 31;
77
		int result = 1;
22859 ashik.ali 78
		result = prime * result + Float.floatToIntBits(amount);
23339 ashik.ali 79
		result = prime * result + ((createTimestamp == null) ? 0 : createTimestamp.hashCode());
22859 ashik.ali 80
		result = prime * result + inventoryItemId;
81
		result = prime * result + schemeId;
22653 ashik.ali 82
		return result;
83
	}
22859 ashik.ali 84
 
22653 ashik.ali 85
	@Override
86
	public boolean equals(Object obj) {
87
		if (this == obj)
88
			return true;
89
		if (obj == null)
90
			return false;
91
		if (getClass() != obj.getClass())
92
			return false;
22859 ashik.ali 93
		SchemeInOut other = (SchemeInOut) obj;
94
		if (Float.floatToIntBits(amount) != Float.floatToIntBits(other.amount))
22653 ashik.ali 95
			return false;
23339 ashik.ali 96
		if (createTimestamp == null) {
97
			if (other.createTimestamp != null)
98
				return false;
99
		} else if (!createTimestamp.equals(other.createTimestamp))
100
			return false;
22859 ashik.ali 101
		if (inventoryItemId != other.inventoryItemId)
102
			return false;
103
		if (schemeId != other.schemeId)
104
			return false;
22653 ashik.ali 105
		return true;
106
	}
107
 
108
	@Override
109
	public String toString() {
23339 ashik.ali 110
		return "SchemeInOut [schemeId=" + schemeId + ", inventoryItemId=" + inventoryItemId + ", amount=" + amount
111
				+ ", createTimestamp=" + createTimestamp + "]";
22653 ashik.ali 112
	}
22859 ashik.ali 113
 
22653 ashik.ali 114
}