Mercurial > dive4elements > river
changeset 172:605320b7df94
Added column annotations for simple fields. TODO: foreign keys.
flys-backend/trunk@1464 c6561f87-3c4e-4783-a992-168aeb5c3f6f
line wrap: on
line diff
--- a/flys-backend/ChangeLog Mon Mar 14 14:52:58 2011 +0000 +++ b/flys-backend/ChangeLog Mon Mar 14 15:29:00 2011 +0000 @@ -1,3 +1,8 @@ +2011-03-14 Sascha L. Teichmann <sascha.teichmann@intevation.de> + + * src/main/java/de/intevation/flys/model/*.java: Added + column annotations for simple fields. TODO: foreign keys. + 2011-03-14 Sascha L. Teichmann <sascha.teichmann@intevation.de> * doc/schema/postgresql.sql, doc/schema/postgresql-cleanup.sql:
--- a/flys-backend/src/main/java/de/intevation/flys/model/Attribute.java Mon Mar 14 14:52:58 2011 +0000 +++ b/flys-backend/src/main/java/de/intevation/flys/model/Attribute.java Mon Mar 14 15:29:00 2011 +0000 @@ -15,9 +15,9 @@ public class Attribute implements Serializable { - private Integer id; + private Integer id; - private String value; + private String value; public Attribute() { } @@ -39,12 +39,13 @@ this.id = id; } + @Column(name = "value") + public String getValue() { + return value; + } + public void setValue(String value) { this.value = value; } - - public String getValue() { - return value; - } } // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 :
--- a/flys-backend/src/main/java/de/intevation/flys/model/DischargeTable.java Mon Mar 14 14:52:58 2011 +0000 +++ b/flys-backend/src/main/java/de/intevation/flys/model/DischargeTable.java Mon Mar 14 15:29:00 2011 +0000 @@ -15,7 +15,7 @@ public class DischargeTable implements Serializable { - private Integer id; + private Integer id; private Gauge gauge; private TimeInterval timeInterval;
--- a/flys-backend/src/main/java/de/intevation/flys/model/DischargeTableValue.java Mon Mar 14 14:52:58 2011 +0000 +++ b/flys-backend/src/main/java/de/intevation/flys/model/DischargeTableValue.java Mon Mar 14 15:29:00 2011 +0000 @@ -34,7 +34,6 @@ strategy = GenerationType.SEQUENCE, generator = "SEQUENCE_DISCHARGE_TABLE_VALUES_ID_SEQ") @Column(name = "id") - public Integer getId() { return id; } @@ -51,20 +50,22 @@ return dischargeTable; } + @Column(name = "q") + public BigDecimal getQ() { + return q; + } + public void setQ(BigDecimal q) { this.q = q; } - public BigDecimal getQ() { - return q; + @Column(name = "w") + public BigDecimal getW() { + return w; } public void setW(BigDecimal w) { this.w = w; } - - public BigDecimal getW() { - return w; - } } // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 :
--- a/flys-backend/src/main/java/de/intevation/flys/model/Gauge.java Mon Mar 14 14:52:58 2011 +0000 +++ b/flys-backend/src/main/java/de/intevation/flys/model/Gauge.java Mon Mar 14 15:29:00 2011 +0000 @@ -45,44 +45,48 @@ this.id = id; } + @Column(name = "name") + public String getName() { + return name; + } + public void setName(String name) { this.name = name; } - public String getName() { - return name; + @Column(name = "station") // FIXME: type mapping needed + public BigDecimal getStation() { + return station; } public void setStation(BigDecimal station) { this.station = station; } - public BigDecimal getStation() { - return station; + @Column(name = "aeo") // FIXME: type mapping needed + public BigDecimal getAeo() { + return aeo; } public void setAeo(BigDecimal aeo) { this.aeo = aeo; } - public BigDecimal getAeo() { - return aeo; + @Column(name = "datum") // FIXME: type mapping needed + public BigDecimal getDatum() { + return datum; } public void setDatum(BigDecimal datum) { this.datum = datum; } - public BigDecimal getDatum() { - return datum; + public Range getRange() { + return range; } public void setRange(Range range) { this.range = range; } - - public Range getRange() { - return range; - } } // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 :
--- a/flys-backend/src/main/java/de/intevation/flys/model/MainValueType.java Mon Mar 14 14:52:58 2011 +0000 +++ b/flys-backend/src/main/java/de/intevation/flys/model/MainValueType.java Mon Mar 14 15:29:00 2011 +0000 @@ -39,12 +39,13 @@ this.id = id; } + @Column(name = "value") + public String getValue() { + return value; + } + public void setValue(String value) { this.value = value; } - - public String getValue() { - return value; - } } // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 :
--- a/flys-backend/src/main/java/de/intevation/flys/model/NamedMainValues.java Mon Mar 14 14:52:58 2011 +0000 +++ b/flys-backend/src/main/java/de/intevation/flys/model/NamedMainValues.java Mon Mar 14 15:29:00 2011 +0000 @@ -39,14 +39,15 @@ this.id = id; } + @Column(name = "name") + public String getName() { + return name; + } + public void setName(String name) { this.name = name; } - public String getName() { - return name; - } - public void setType(MainValueType type) { this.type = type; }
--- a/flys-backend/src/main/java/de/intevation/flys/model/Position.java Mon Mar 14 14:52:58 2011 +0000 +++ b/flys-backend/src/main/java/de/intevation/flys/model/Position.java Mon Mar 14 15:29:00 2011 +0000 @@ -39,12 +39,13 @@ this.id = id; } + @Column(name = "value") + public String getValue() { + return value; + } + public void setValue(String value) { this.value = value; } - - public String getValue() { - return value; - } } // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 :
--- a/flys-backend/src/main/java/de/intevation/flys/model/Range.java Mon Mar 14 14:52:58 2011 +0000 +++ b/flys-backend/src/main/java/de/intevation/flys/model/Range.java Mon Mar 14 15:29:00 2011 +0000 @@ -43,22 +43,24 @@ this.id = id; } + @Column(name = "a") // FIXME: type mapping needed? + public BigDecimal getA() { + return a; + } + public void setA(BigDecimal a) { this.a = a; } - public BigDecimal getA() { - return a; + @Column(name = "b") // FIXME: type mapping needed? + public BigDecimal getB() { + return b; } public void setB(BigDecimal b) { this.b = b; } - public BigDecimal getB() { - return b; - } - public void setRiver(River river) { this.river = river; }
--- a/flys-backend/src/main/java/de/intevation/flys/model/TimeInterval.java Mon Mar 14 14:52:58 2011 +0000 +++ b/flys-backend/src/main/java/de/intevation/flys/model/TimeInterval.java Mon Mar 14 15:29:00 2011 +0000 @@ -18,8 +18,8 @@ implements Serializable { private Integer id; - private Date startTime; - private Date stopTime; + private Date startTime; + private Date stopTime; public TimeInterval() { } @@ -41,20 +41,22 @@ this.id = id; } + @Column(name = "start_time") // FIXME: type mapping needed? + public Date getStartTime() { + return startTime; + } + public void setStartTime(Date startTime) { this.startTime = startTime; } - public Date getStartTime() { - return startTime; + @Column(name = "stop_time") // FIXME: type mapping needed? + public Date getStopTime() { + return stopTime; } public void setStopTime(Date stopTime) { this.stopTime = stopTime; } - - public Date getStopTime() { - return stopTime; - } } // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 :
--- a/flys-backend/src/main/java/de/intevation/flys/model/Wst.java Mon Mar 14 14:52:58 2011 +0000 +++ b/flys-backend/src/main/java/de/intevation/flys/model/Wst.java Mon Mar 14 15:29:00 2011 +0000 @@ -47,12 +47,13 @@ return river; } + @Column(name = "description") + public String getDescription() { + return description; + } + public void setDescription(String description) { this.description = description; } - - public String getDescription() { - return description; - } } // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 :
--- a/flys-backend/src/main/java/de/intevation/flys/model/WstColumn.java Mon Mar 14 14:52:58 2011 +0000 +++ b/flys-backend/src/main/java/de/intevation/flys/model/WstColumn.java Mon Mar 14 15:29:00 2011 +0000 @@ -41,30 +41,32 @@ this.id = id; } + public Wst getWst() { + return wst; + } + public void setWst(Wst wst) { this.wst = wst; } - public Wst getWst() { - return wst; + @Column(name = "name") + public String getName() { + return name; } public void setName(String name) { this.name = name; } - public String getName() { - return name; + @Column(name = "description") + public String getDescription() { + return description; } public void setDescription(String description) { this.description = description; } - public String getDescription() { - return description; - } - public void setTimeInterval(TimeInterval timeInterval) { this.timeInterval = timeInterval; }
--- a/flys-backend/src/main/java/de/intevation/flys/model/WstColumnQRange.java Mon Mar 14 14:52:58 2011 +0000 +++ b/flys-backend/src/main/java/de/intevation/flys/model/WstColumnQRange.java Mon Mar 14 15:29:00 2011 +0000 @@ -39,21 +39,21 @@ this.id = id; } + public WstColumn getWstColumn() { + return wstColumn; + } + public void setWstColumn(WstColumn wstColumn) { this.wstColumn = wstColumn; } - public WstColumn getWstColumn() { - return wstColumn; + public WstQRange getWstQRange() { + return wstQRange; } public void setWstQRange(WstQRange wstQRange) { this.wstQRange = wstQRange; } - - public WstQRange getWstQRange() { - return wstQRange; - } } // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 :
--- a/flys-backend/src/main/java/de/intevation/flys/model/WstColumnValue.java Mon Mar 14 14:52:58 2011 +0000 +++ b/flys-backend/src/main/java/de/intevation/flys/model/WstColumnValue.java Mon Mar 14 15:29:00 2011 +0000 @@ -42,28 +42,29 @@ this.id = id; } + public WstColumn getWstColumn() { + return wstColumn; + } + public void setWstColumn(WstColumn wstColumn) { this.wstColumn = wstColumn; } - public WstColumn getWstColumn() { - return wstColumn; + public Position getPosition() { + return position; } public void setPosition(Position position) { this.position = position; } - public Position getPosition() { - return position; + @Column(name = "w") // FIXME: type mapping needed? + public BigDecimal getW() { + return w; } public void setW(BigDecimal w) { this.w = w; } - - public BigDecimal getW() { - return w; - } } // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 :
--- a/flys-backend/src/main/java/de/intevation/flys/model/WstQRange.java Mon Mar 14 14:52:58 2011 +0000 +++ b/flys-backend/src/main/java/de/intevation/flys/model/WstQRange.java Mon Mar 14 15:29:00 2011 +0000 @@ -41,20 +41,21 @@ this.id = id; } + public Range getRange() { + return range; + } + public void setRange(Range range) { this.range = range; } - public Range getRange() { - return range; + @Column(name = "q") // FIXME: type mapping needed?! + public BigDecimal getQ() { + return q; } public void setQ(BigDecimal q) { this.q = q; } - - public BigDecimal getQ() { - return q; - } } // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 :