01: package app.data.test;
02:
03: import javax.persistence.EmbeddedId;
04: import javax.persistence.Entity;
05: import javax.persistence.ManyToOne;
06: import javax.persistence.Table;
07:
08: /**
09: * User Preference entity bean.
10: */
11: @Entity
12: @Table(name="s_user_preference")
13: public class UserPreference {
14:
15: @EmbeddedId
16: UserPreferenceId id;
17:
18: String prefValue;
19:
20: @ManyToOne
21: User user;
22:
23: /**
24: * Return id.
25: */
26: public UserPreferenceId getId() {
27: return id;
28: }
29:
30: /**
31: * Set id.
32: */
33: public void setId(UserPreferenceId id) {
34: this .id = id;
35: }
36:
37: /**
38: * Return pref value.
39: */
40: public String getPrefValue() {
41: return prefValue;
42: }
43:
44: /**
45: * Set pref value.
46: */
47: public void setPrefValue(String prefValue) {
48: this .prefValue = prefValue;
49: }
50:
51: /**
52: * Return user.
53: */
54: public User getUser() {
55: return user;
56: }
57:
58: /**
59: * Set user.
60: */
61: public void setUser(User user) {
62: this.user = user;
63: }
64:
65: }
|