teichmann@5844: /* Copyright (C) 2011, 2012, 2013 by Bundesanstalt für Gewässerkunde teichmann@5844: * Software engineering by Intevation GmbH teichmann@5844: * teichmann@5992: * This file is Free Software under the GNU AGPL (>=v3) teichmann@5844: * and comes with ABSOLUTELY NO WARRANTY! Check out the teichmann@5992: * documentation coming with Dive4Elements River for details. teichmann@5844: */ teichmann@5844: teichmann@5829: package org.dive4elements.river.model; ingo@2809: ingo@2809: import java.io.Serializable; ingo@2809: ingo@2809: import javax.persistence.Entity; ingo@2809: import javax.persistence.Id; ingo@2809: import javax.persistence.Table; ingo@2809: import javax.persistence.GeneratedValue; ingo@2809: import javax.persistence.Column; ingo@2809: import javax.persistence.SequenceGenerator; ingo@2809: import javax.persistence.GenerationType; ingo@2809: ingo@2809: ingo@2809: @Entity ingo@2809: @Table(name = "location_system") ingo@2809: public class LocationSystem implements Serializable { ingo@2809: ingo@2809: protected Integer id; ingo@2809: ingo@2809: protected String name; ingo@2809: protected String description; ingo@2809: ingo@2809: ingo@2809: public LocationSystem() { ingo@2809: } ingo@2809: ingo@2809: ingo@2809: public LocationSystem(String name, String description) { ingo@2809: this.name = name; ingo@2809: this.description = description; ingo@2809: } ingo@2809: ingo@2809: @Id ingo@2809: @SequenceGenerator( ingo@2809: name = "SEQUENCE_LOCATION_SYSTEM_ID_SEQ", ingo@2809: sequenceName = "LOCATION_SYSTEM_SEQ", ingo@2809: allocationSize = 1) ingo@2809: @GeneratedValue( ingo@2809: strategy = GenerationType.SEQUENCE, ingo@2809: generator = "SEQUENCE_LOCATION_SYSTEM_ID_SEQ") ingo@2809: @Column(name = "id") ingo@2809: public Integer getId() { ingo@2809: return id; ingo@2809: } ingo@2809: ingo@2809: public void setId(Integer id) { ingo@2809: this.id = id; ingo@2809: } ingo@2809: ingo@2809: @Column(name = "name") ingo@2809: public String getName() { ingo@2809: return name; ingo@2809: } ingo@2809: ingo@2809: public void setName(String name) { ingo@2809: this.name = name; ingo@2809: } ingo@2809: ingo@2809: @Column(name = "description") ingo@2809: public String getDescription() { ingo@2809: return description; ingo@2809: } ingo@2809: ingo@2809: public void setDescription(String description) { ingo@2809: this.description = description; ingo@2809: } ingo@2809: } ingo@2809: // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 :