Subversion Repositories SmartDukaan

Rev

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

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