Mercurial > lada > lada-server
changeset 655:309870b4142c
Use the new usertype in messprogramm_messmethode.
author | Raimund Renkert <raimund.renkert@intevation.de> |
---|---|
date | Tue, 12 May 2015 15:16:40 +0200 |
parents | 54992c5f9898 |
children | 866d05db7a6a |
files | src/main/java/de/intevation/lada/model/land/MessprogrammMmt.java |
diffstat | 1 files changed, 14 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/src/main/java/de/intevation/lada/model/land/MessprogrammMmt.java Tue May 12 15:16:05 2015 +0200 +++ b/src/main/java/de/intevation/lada/model/land/MessprogrammMmt.java Tue May 12 15:16:40 2015 +0200 @@ -5,10 +5,16 @@ import javax.persistence.Column; import javax.persistence.Entity; +import javax.persistence.GeneratedValue; +import javax.persistence.GenerationType; import javax.persistence.Id; import javax.persistence.Table; -import org.hibernate.mapping.Array; +import org.hibernate.annotations.Type; +import org.hibernate.annotations.TypeDef; +import org.hibernate.annotations.TypeDefs; + +import de.intevation.lada.util.data.IntegerArrayType; /** @@ -16,16 +22,20 @@ */ @Entity @Table(name="messprogramm_mmt") +@TypeDefs({@TypeDef(name="IntegerArray", typeClass=IntegerArrayType.class)}) public class MessprogrammMmt implements Serializable { private static final long serialVersionUID = 1L; @Id + @GeneratedValue(strategy=GenerationType.IDENTITY) + @Column(name="id", unique=true, nullable=false) private Integer id; @Column(name="letzte_aenderung") private Timestamp letzteAenderung; - private Array messgroessen; + @Type(type="IntegerArray") + private Integer[] messgroessen; @Column(name="mmt_id") private String mmtId; @@ -52,11 +62,11 @@ this.letzteAenderung = letzteAenderung; } - public Array getMessgroessen() { + public Integer[] getMessgroessen() { return this.messgroessen; } - public void setMessgroessen(Array messgroessen) { + public void setMessgroessen(Integer[] messgroessen) { this.messgroessen = messgroessen; }