Subversion Repositories SmartDukaan

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
31860 tejbeer 1
package com.spice.profitmandi.dao.entity.fofo;
2
 
3
import javax.persistence.Column;
4
import javax.persistence.Entity;
5
import javax.persistence.Id;
6
import javax.persistence.Table;
7
 
8
@Entity
9
@Table(name="dtr.customer_wallet",schema="transaction")
10
public class CustomerWallet{
11
 
12
 
13
	@Id
14
	@Column(unique = true, updatable = false)
15
	private int customerId;
16
	private int amount;
17
 
18
	@Column(name = "refundable_amount")
19
	private int refundableAmount;
20
 
21
	@Override
22
	public String toString() {
23
		return "CustomerWallet [customerId=" + customerId + ", amount=" + amount + ", refundableAmount="
24
				+ refundableAmount + "]";
25
	}
26
 
27
	public int getCustomerId() {
28
		return customerId;
29
	}
30
 
31
	public void setCustomerId(int customerId) {
32
		this.customerId = customerId;
33
	}
34
 
35
	public int getAmount() {
36
		return amount;
37
	}
38
 
39
	public void setAmount(int amount) {
40
		this.amount = amount;
41
	}
42
 
43
	public int getRefundableAmount() {
44
		return refundableAmount;
45
	}
46
 
47
	public void setRefundableAmount(int refundableAmount) {
48
		this.refundableAmount = refundableAmount;
49
	}
50
 
51
	@Override
52
	public int hashCode() {
53
		final int prime = 31;
54
		int result = 1;
55
		result = prime * result + amount;
56
		result = prime * result + customerId;
57
		result = prime * result + refundableAmount;
58
		return result;
59
	}
60
 
61
	@Override
62
	public boolean equals(Object obj) {
63
		if (this == obj)
64
			return true;
65
		if (obj == null)
66
			return false;
67
		if (getClass() != obj.getClass())
68
			return false;
69
		CustomerWallet other = (CustomerWallet) obj;
70
		if (amount != other.amount)
71
			return false;
72
		if (customerId != other.customerId)
73
			return false;
74
		if (refundableAmount != other.refundableAmount)
75
			return false;
76
		return true;
77
	}
78
 
79
 
80
 
81
}