Subversion Repositories SmartDukaan

Rev

Rev 21716 | Rev 22009 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
21716 ashik.ali 1
package com.spice.profitmandi.dao.entity.transaction;
21552 ashik.ali 2
 
3
import javax.persistence.Entity;
4
import javax.persistence.GeneratedValue;
5
import javax.persistence.GenerationType;
6
import javax.persistence.Id;
7
import javax.persistence.Table;
8
 
9
@Entity
10
@Table(name="transaction.userwallet",schema="transaction")
11
public class UserWallet{
12
	/**
13
	 * 
14
	 */
15
	@Id
16
	@GeneratedValue(strategy=GenerationType.IDENTITY)
17
	private int id;
18
	private int userId;
19
	private int amount;
20
	private int refundable_amount;
21
 
22
	public int getId() {
23
		return id;
24
	}
25
	public void setId(int id) {
26
		this.id = id;
27
	}
28
	public int getUserId() {
29
		return userId;
30
	}
31
	public void setUserId(int userId) {
32
		this.userId = userId;
33
	}
34
	public int getAmount() {
35
		return amount;
36
	}
37
	public void setAmount(int amount) {
38
		this.amount = amount;
39
	}
40
	public int getRefundable_amount() {
41
		return refundable_amount;
42
	}
43
	public void setRefundable_amount(int refundable_amount) {
44
		this.refundable_amount = refundable_amount;
45
	}
21924 ashik.ali 46
 
21602 ashik.ali 47
	@Override
21924 ashik.ali 48
	public int hashCode() {
49
		final int prime = 31;
50
		int result = 1;
51
		result = prime * result + amount;
52
		result = prime * result + id;
53
		result = prime * result + refundable_amount;
54
		result = prime * result + userId;
55
		return result;
56
	}
57
	@Override
58
	public boolean equals(Object obj) {
59
		if (this == obj)
60
			return true;
61
		if (obj == null)
62
			return false;
63
		if (getClass() != obj.getClass())
64
			return false;
65
		UserWallet other = (UserWallet) obj;
66
		if (amount != other.amount)
67
			return false;
68
		if (id != other.id)
69
			return false;
70
		if (refundable_amount != other.refundable_amount)
71
			return false;
72
		if (userId != other.userId)
73
			return false;
74
		return true;
75
	}
76
	@Override
21602 ashik.ali 77
	public String toString() {
78
		return "UserWallet [id=" + id + ", userId=" + userId + ", amount=" + amount + ", refundable_amount="
79
				+ refundable_amount + "]";
80
	}
81
 
82
 
21552 ashik.ali 83
}