diff options
Diffstat (limited to 'src/org/traccar/web/shared')
-rw-r--r-- | src/org/traccar/web/shared/model/User.java | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/src/org/traccar/web/shared/model/User.java b/src/org/traccar/web/shared/model/User.java index 9a67c6d9..77a17eef 100644 --- a/src/org/traccar/web/shared/model/User.java +++ b/src/org/traccar/web/shared/model/User.java @@ -25,8 +25,11 @@ import javax.persistence.FetchType; import javax.persistence.GeneratedValue; import javax.persistence.Id; import javax.persistence.OneToMany; +import javax.persistence.OneToOne; import javax.persistence.Table; +import com.google.gwt.user.client.rpc.GwtTransient; + @Entity @Table(name="users") public class User implements Serializable, Cloneable { @@ -82,11 +85,27 @@ public class User implements Serializable, Cloneable { return admin; } + @GwtTransient @OneToMany(fetch = FetchType.EAGER) private List<Device> devices = new LinkedList<Device>(); + public void setDevices(List<Device> devices) { + this.devices = devices; + } + public List<Device> getDevices() { return devices; } + @OneToOne + private UserSettings userSettings; + + public void setUserSettings(UserSettings userSettings) { + this.userSettings = userSettings; + } + + public UserSettings getUserSettings() { + return userSettings; + } + } |