1   
2   
3   
4   
5   
6   
7   
8   package com.buckosoft.BuckoVidLib.domain;
9   
10  import java.io.Serializable;
11  
12  import com.buckosoft.BuckoVidLib.util.HashCodeUtil;
13  
14  
15  
16  
17  
18  
19  
20  public class UserAttribute implements Serializable {
21  	private static final long serialVersionUID = 1L;
22  
23  	private	int		userId;
24  	private	String	key;
25  	private	String	value;
26  
27  
28  	
29  	public UserAttribute() {}
30  	
31  	
32  
33  
34  
35  
36  	public UserAttribute(int userId, String key, String value) {
37  		this.userId = userId;
38  		this.key = key;
39  		this.value = value;
40  	}
41  	
42  	
43  
44  
45  	@Override
46  	public boolean equals(Object obj) {
47  		UserAttribute ua = (UserAttribute)obj;
48  		return(this.userId == ua.userId && this.key.equals(ua.key));
49  	}
50  	
51  
52  
53  	@Override
54  	public int hashCode() {
55  		int result = HashCodeUtil.SEED;
56  		result = HashCodeUtil.hash(result, userId);
57  		result = HashCodeUtil.hash(result, key);
58  		return(result);
59  	}
60  	
61  
62  
63  	public int getUserId() {
64  		return userId;
65  	}
66  	
67  
68  
69  	public void setUserId(int userId) {
70  		this.userId = userId;
71  	}
72  	
73  
74  
75  	public String getKey() {
76  		return key;
77  	}
78  	
79  
80  
81  	public void setKey(String key) {
82  		this.key = key;
83  	}
84  	
85  
86  
87  	public String getValue() {
88  		return value;
89  	}
90  	
91  
92  
93  	public void setValue(String value) {
94  		this.value = value;
95  	}
96  	
97  
98  }