ingo@2837: package de.intevation.flys.model; ingo@2837: ingo@2837: import java.io.Serializable; ingo@2837: ingo@2837: import javax.persistence.Entity; ingo@2837: import javax.persistence.Id; ingo@2837: import javax.persistence.Table; ingo@2837: import javax.persistence.GeneratedValue; ingo@2837: import javax.persistence.Column; ingo@2837: import javax.persistence.SequenceGenerator; ingo@2837: import javax.persistence.GenerationType; ingo@2837: import javax.persistence.JoinColumn; ingo@2837: import javax.persistence.OneToOne; ingo@2837: ingo@2837: import org.apache.log4j.Logger; ingo@2837: ingo@2837: ingo@2837: @Entity ingo@2837: @Table(name = "grain_fraction") ingo@2837: public class GrainFraction ingo@2837: implements Serializable ingo@2837: { ingo@2840: public static final String TOTAL = "total"; ingo@2840: public static final String COARSE = "coarse"; ingo@2840: public static final String FINE_MIDDLE = "fine_middle"; ingo@2840: public static final String SAND = "sand"; ingo@2840: public static final String SUSP_SAND = "susp_sand"; ingo@2840: public static final String SUSP_SAND_BED = "susp_sand_bed"; ingo@2840: public static final String SUSPENDED_SEDIMENT = "suspended_sediment"; ingo@2840: ingo@2840: ingo@2837: private static Logger logger = Logger.getLogger(GrainFraction.class); ingo@2837: ingo@2837: private Integer id; ingo@2837: ingo@2837: private String name; ingo@2837: ingo@2837: private Double lower; ingo@2837: private Double upper; ingo@2837: ingo@2837: ingo@2837: public GrainFraction() { ingo@2837: } ingo@2837: tom@5439: public GrainFraction(String name, Double lower, Double upper) { ingo@2837: this.name = name; ingo@2837: this.lower = lower; ingo@2837: this.upper = upper; ingo@2837: } ingo@2837: ingo@2837: @Id ingo@2837: @SequenceGenerator( ingo@2837: name = "SEQUENCE_GRAIN_FRACTION_ID_SEQ", ingo@2837: sequenceName = "GRAIN_FRACTION_ID_SEQ", ingo@2837: allocationSize = 1) ingo@2837: @GeneratedValue( ingo@2837: strategy = GenerationType.SEQUENCE, ingo@2837: generator = "SEQUENCE_GRAIN_FRACTION_ID_SEQ") ingo@2837: @Column(name = "id") ingo@2837: public Integer getId() { ingo@2837: return id; ingo@2837: } ingo@2837: ingo@2837: public void setId(Integer id) { ingo@2837: this.id = id; ingo@2837: } ingo@2837: ingo@2837: @Column(name = "name" ) ingo@2837: public String getName() { ingo@2837: return name; ingo@2837: } ingo@2837: ingo@2837: public void setName(String name) { ingo@2837: this.name = name; ingo@2837: } ingo@2837: ingo@2837: @Column(name = "lower") ingo@2837: public Double getLower() { ingo@2837: return lower; ingo@2837: } ingo@2837: ingo@2837: public void setLower(Double lower) { ingo@2837: this.lower = lower; ingo@2837: } ingo@2837: ingo@2837: @Column(name = "upper") ingo@2837: public Double getUpper() { ingo@2837: return upper; ingo@2837: } ingo@2837: ingo@2837: public void setUpper(Double upper) { ingo@2837: this.upper = upper; ingo@2837: } ingo@2837: ingo@2837: } ingo@2837: // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 :