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 + id;
58
		return result;
59
	}
60
	@Override
61
	public boolean equals(Object obj) {
62
		if (this == obj)
63
			return true;
64
		if (obj == null)
65
			return false;
66
		if (getClass() != obj.getClass())
67
			return false;
68
		UserAccounts other = (UserAccounts) obj;
69
		if (id != other.id)
70
			return false;
71
		return true;
72
	}
73
	@Override
21602 ashik.ali 74
	public String toString() {
75
		return "UserAccounts [id=" + id + ", user_id=" + user_id + ", account_type=" + account_type + ", account_key="
76
				+ account_key + "]";
77
	}
21545 ashik.ali 78
 
21602 ashik.ali 79
 
21545 ashik.ali 80
}