Subversion Repositories SmartDukaan

Rev

Rev 23527 | Rev 24592 | 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;
23968 amit.gupta 8
import javax.persistence.GeneratedValue;
9
import javax.persistence.GenerationType;
22653 ashik.ali 10
import javax.persistence.Id;
11
import javax.persistence.Table;
12
 
13
@Entity
22859 ashik.ali 14
@Table(name="fofo.scheme_in_out", schema = "fofo")
15
public class SchemeInOut implements Serializable{
22653 ashik.ali 16
 
17
	private static final long serialVersionUID = 1L;
22859 ashik.ali 18
 
19
	@Id
23968 amit.gupta 20
	@GeneratedValue(strategy = GenerationType.IDENTITY)
21
	private int id;
22
 
22859 ashik.ali 23
	@Column(name = "scheme_id")
24
	private int schemeId;
22653 ashik.ali 25
 
22859 ashik.ali 26
	@Column(name = "inventory_item_id")
27
	private int inventoryItemId;
22653 ashik.ali 28
 
29
	@Column(name = "amount")
30
	private float amount;
31
 
23345 ashik.ali 32
	@Column(name = "create_timestamp")
23339 ashik.ali 33
	private LocalDateTime createTimestamp = LocalDateTime.now();
34
 
23509 amit.gupta 35
	@Column(name = "rolled_back_timestamp")
23527 ashik.ali 36
	private LocalDateTime rolledBackTimestamp;
23509 amit.gupta 37
 
22859 ashik.ali 38
	public int getSchemeId() {
39
		return schemeId;
22653 ashik.ali 40
	}
41
 
22859 ashik.ali 42
	public void setSchemeId(int schemeId) {
43
		this.schemeId = schemeId;
22653 ashik.ali 44
	}
45
 
22859 ashik.ali 46
	public int getInventoryItemId() {
47
		return inventoryItemId;
48
	}
49
 
50
	public void setInventoryItemId(int inventoryItemId) {
51
		this.inventoryItemId = inventoryItemId;
52
	}
53
 
22653 ashik.ali 54
	public float getAmount() {
55
		return amount;
56
	}
57
 
58
	public void setAmount(float amount) {
59
		this.amount = amount;
60
	}
23339 ashik.ali 61
 
62
	public LocalDateTime getCreateTimestamp() {
63
		return createTimestamp;
64
	}
65
 
66
	public void setCreateTimestamp(LocalDateTime createTimestamp) {
67
		this.createTimestamp = createTimestamp;
68
	}
23527 ashik.ali 69
 
70
	public LocalDateTime getRolledBackTimestamp() {
71
		return rolledBackTimestamp;
72
	}
73
 
74
	public void setRolledBackTimestamp(LocalDateTime rolledBackTimestamp) {
75
		this.rolledBackTimestamp = rolledBackTimestamp;
76
	}
22859 ashik.ali 77
 
22653 ashik.ali 78
	@Override
79
	public int hashCode() {
80
		final int prime = 31;
81
		int result = 1;
22859 ashik.ali 82
		result = prime * result + Float.floatToIntBits(amount);
23339 ashik.ali 83
		result = prime * result + ((createTimestamp == null) ? 0 : createTimestamp.hashCode());
22859 ashik.ali 84
		result = prime * result + inventoryItemId;
85
		result = prime * result + schemeId;
22653 ashik.ali 86
		return result;
87
	}
22859 ashik.ali 88
 
22653 ashik.ali 89
	@Override
90
	public boolean equals(Object obj) {
91
		if (this == obj)
92
			return true;
93
		if (obj == null)
94
			return false;
95
		if (getClass() != obj.getClass())
96
			return false;
22859 ashik.ali 97
		SchemeInOut other = (SchemeInOut) obj;
98
		if (Float.floatToIntBits(amount) != Float.floatToIntBits(other.amount))
22653 ashik.ali 99
			return false;
23339 ashik.ali 100
		if (createTimestamp == null) {
101
			if (other.createTimestamp != null)
102
				return false;
103
		} else if (!createTimestamp.equals(other.createTimestamp))
104
			return false;
22859 ashik.ali 105
		if (inventoryItemId != other.inventoryItemId)
106
			return false;
107
		if (schemeId != other.schemeId)
108
			return false;
22653 ashik.ali 109
		return true;
110
	}
111
 
112
	@Override
113
	public String toString() {
23339 ashik.ali 114
		return "SchemeInOut [schemeId=" + schemeId + ", inventoryItemId=" + inventoryItemId + ", amount=" + amount
115
				+ ", createTimestamp=" + createTimestamp + "]";
22653 ashik.ali 116
	}
22859 ashik.ali 117
 
22653 ashik.ali 118
}