Subversion Repositories SmartDukaan

Rev

Go to most recent revision | Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
21720 ashik.ali 1
package com.spice.profitmandi.dao.entity.dtr;
21545 ashik.ali 2
 
3
import javax.persistence.Entity;
4
import javax.persistence.EnumType;
5
import javax.persistence.Enumerated;
6
import javax.persistence.GeneratedValue;
7
import javax.persistence.GenerationType;
8
import javax.persistence.Id;
9
import javax.persistence.Table;
10
 
21720 ashik.ali 11
import com.spice.profitmandi.dao.enumuration.dtr.AccountType;
21545 ashik.ali 12
 
13
@Entity
21720 ashik.ali 14
@Table(name="dtr.user_accounts",schema="dtr")
21545 ashik.ali 15
public class UserAccounts{
16
	/**
17
	 * 
18
	 */	
19
	@Id
20
	@GeneratedValue(strategy=GenerationType.IDENTITY)
21
	private int id;
22
	private int user_id;
23
	@Enumerated(EnumType.STRING)
24
	private AccountType account_type ;
25
	private String account_key;
26
 
27
	public int getId() {
28
		return id;
29
	}
30
	public void setId(int id) {
31
		this.id = id;
32
	}
33
	public int getUser_id() {
34
		return user_id;
35
	}
36
	public void setUser_id(int user_id) {
37
		this.user_id = user_id;
38
	}
39
	public AccountType getAccount_type() {
40
		return account_type;
41
	}
42
	public void setAccount_type(AccountType account_type) {
43
		this.account_type = account_type;
44
	}
45
	public String getAccount_key() {
46
		return account_key;
47
	}
48
	public void setAccount_key(String account_key) {
49
		this.account_key = account_key;
50
	}
21924 ashik.ali 51
 
52
 
21602 ashik.ali 53
	@Override
21924 ashik.ali 54
	public int hashCode() {
55
		final int prime = 31;
56
		int result = 1;
57
		result = prime * result + ((account_key == null) ? 0 : account_key.hashCode());
58
		result = prime * result + ((account_type == null) ? 0 : account_type.hashCode());
59
		result = prime * result + id;
60
		result = prime * result + user_id;
61
		return result;
62
	}
63
	@Override
64
	public boolean equals(Object obj) {
65
		if (this == obj)
66
			return true;
67
		if (obj == null)
68
			return false;
69
		if (getClass() != obj.getClass())
70
			return false;
71
		UserAccounts other = (UserAccounts) obj;
72
		if (account_key == null) {
73
			if (other.account_key != null)
74
				return false;
75
		} else if (!account_key.equals(other.account_key))
76
			return false;
77
		if (account_type != other.account_type)
78
			return false;
79
		if (id != other.id)
80
			return false;
81
		if (user_id != other.user_id)
82
			return false;
83
		return true;
84
	}
85
	@Override
21602 ashik.ali 86
	public String toString() {
87
		return "UserAccounts [id=" + id + ", user_id=" + user_id + ", account_type=" + account_type + ", account_key="
88
				+ account_key + "]";
89
	}
21545 ashik.ali 90
 
21602 ashik.ali 91
 
21545 ashik.ali 92
}