Mercurial > lada > lada-server
changeset 850:2b9fd00bca56
Fixed code style.
author | Raimund Renkert <raimund.renkert@intevation.de> |
---|---|
date | Wed, 27 Jan 2016 15:33:57 +0100 |
parents | d0a591b3eade |
children | 00eae82dea5f |
files | src/main/java/de/intevation/lada/model/stamm/LadaUser.java |
diffstat | 1 files changed, 85 insertions(+), 75 deletions(-) [+] |
line wrap: on
line diff
--- a/src/main/java/de/intevation/lada/model/stamm/LadaUser.java Wed Jan 27 15:32:49 2016 +0100 +++ b/src/main/java/de/intevation/lada/model/stamm/LadaUser.java Wed Jan 27 15:33:57 2016 +0100 @@ -1,9 +1,20 @@ +/* Copyright (C) 2013 by Bundesamt fuer Strahlenschutz + * Software engineering by Intevation GmbH + * + * This file is Free Software under the GNU GPL (v>=3) + * and comes with ABSOLUTELY NO WARRANTY! Check out + * the documentation coming with IMIS-Labordaten-Application for details. + */ package de.intevation.lada.model.stamm; import java.io.Serializable; -import javax.persistence.*; import java.util.List; +import javax.persistence.Entity; +import javax.persistence.Id; +import javax.persistence.OneToMany; +import javax.persistence.Table; + /** * The persistent class for the lada_user database table. @@ -11,84 +22,83 @@ */ @Entity @Table(name="lada_user") -@NamedQuery(name="LadaUser.findAll", query="SELECT l FROM LadaUser l") public class LadaUser implements Serializable { - private static final long serialVersionUID = 1L; - - @Id - private Integer id; - - private String name; - - //bi-directional many-to-one association to Favorite - @OneToMany(mappedBy="ladaUser") - private List<Favorite> favorites; - - //bi-directional many-to-one association to FilterValue - @OneToMany(mappedBy="ladaUser") - private List<FilterValue> filterValues; - - public LadaUser() { - } - - public Integer getId() { - return this.id; - } - - public void setId(Integer id) { - this.id = id; - } - - public String getName() { - return this.name; - } - - public void setName(String name) { - this.name = name; - } - - public List<Favorite> getFavorites() { - return this.favorites; - } + private static final long serialVersionUID = 1L; - public void setFavorites(List<Favorite> favorites) { - this.favorites = favorites; - } - - public Favorite addFavorite(Favorite favorite) { - getFavorites().add(favorite); - favorite.setLadaUser(this); - - return favorite; - } - - public Favorite removeFavorite(Favorite favorite) { - getFavorites().remove(favorite); - favorite.setLadaUser(null); - - return favorite; - } + @Id + private Integer id; - public List<FilterValue> getFilterValues() { - return this.filterValues; - } - - public void setFilterValues(List<FilterValue> filterValues) { - this.filterValues = filterValues; - } + private String name; - public FilterValue addFilterValue(FilterValue filterValue) { - getFilterValues().add(filterValue); - filterValue.setLadaUser(this); - - return filterValue; - } + //bi-directional many-to-one association to Favorite + @OneToMany(mappedBy="ladaUser") + private List<Favorite> favorites; - public FilterValue removeFilterValue(FilterValue filterValue) { - getFilterValues().remove(filterValue); - filterValue.setLadaUser(null); + //bi-directional many-to-one association to FilterValue + @OneToMany(mappedBy="ladaUser") + private List<FilterValue> filterValues; - return filterValue; - } + public LadaUser() { + } -} \ No newline at end of file + public Integer getId() { + return this.id; + } + + public void setId(Integer id) { + this.id = id; + } + + public String getName() { + return this.name; + } + + public void setName(String name) { + this.name = name; + } + + public List<Favorite> getFavorites() { + return this.favorites; + } + + public void setFavorites(List<Favorite> favorites) { + this.favorites = favorites; + } + + public Favorite addFavorite(Favorite favorite) { + getFavorites().add(favorite); + favorite.setLadaUser(this); + + return favorite; + } + + public Favorite removeFavorite(Favorite favorite) { + getFavorites().remove(favorite); + favorite.setLadaUser(null); + + return favorite; + } + + public List<FilterValue> getFilterValues() { + return this.filterValues; + } + + public void setFilterValues(List<FilterValue> filterValues) { + this.filterValues = filterValues; + } + + public FilterValue addFilterValue(FilterValue filterValue) { + getFilterValues().add(filterValue); + filterValue.setLadaUser(this); + + return filterValue; + } + + public FilterValue removeFilterValue(FilterValue filterValue) { + getFilterValues().remove(filterValue); + filterValue.setLadaUser(null); + + return filterValue; + } + +}