Mercurial > dive4elements > river
view flys-backend/src/main/java/de/intevation/seddb/model/Sohlprobe.java @ 5509:627584bc0586
Datacage: Added <dc:filter> element. This allows cleaner way to narrow the datasets.
Example:
<dc:context>
<dc:statement>
SELECT DISTINCT
name AS hws_name,
official AS hws_official,
kind_id AS hws_kind
FROM hws_lines
WHERE river_id = ${river_id}
</dc:statement>
<dc:if test="dc:has-result()">
<lines>
<dc:macro name="hws-lines">
<dc:elements>
<hws factory="hwsfactory" name="{$hws_name}"/>
</dc:elements>
</dc:macro>
<dc:filter expr="$hws_official=1">
<dc:if test="dc:has-result()">
<official>
<dc:filter expr="$hws_kind=1">
<dc:if test="dc:has-result()">
<Durchlass><dc:call-macro name="hws-lines"></Durchlass>
</dc:if>
</dc:filter>
<dc:filter expr="$hws_kind=2">
<dc:if test="dc:has-result()">
<Damm><dc:call-macro name="hws-lines"></Damm>
</dc:if>
</dc:filter>
<dc:filter expr="$hws_kind=3">
<dc:if test="dc:has-result()">
<Graben><dc:call-macro name="hws-lines"></Graben>
</dc:if>
</dc:filter>
</official>
</dc:if>
</dc:filter>
</lines>
</dc:if>
</dc:context>
author | Sascha L. Teichmann <teichmann@intevation.de> |
---|---|
date | Thu, 28 Mar 2013 16:51:15 +0100 |
parents | 2ae732e2c65c |
children | 18619c1e7c2a |
line wrap: on
line source
package de.intevation.seddb.model; // Generated 14.06.2012 11:30:57 by Hibernate Tools 3.4.0.CR1 import java.math.BigDecimal; import java.util.Date; import java.util.HashSet; import java.util.Set; import javax.persistence.Column; import javax.persistence.Entity; import javax.persistence.FetchType; import javax.persistence.Id; import javax.persistence.JoinColumn; import javax.persistence.ManyToOne; import javax.persistence.OneToMany; import javax.persistence.Table; import javax.persistence.Temporal; import javax.persistence.TemporalType; /** * Sohlprobe generated by hbm2java */ @Entity @Table(name="SOHLPROBE" ,schema="SEDDB" ) public class Sohlprobe implements java.io.Serializable { private long sohlprobeid; private Zzprobenahmeart zzprobenahmeart; private Sohltest sohltest; private BigDecimal tiefevon; private BigDecimal tiefebis; private String beschreibung; private Date lastupdated; private Set<Probebild> probebilds = new HashSet<Probebild>(0); private Set<Siebanalyse> siebanalyses = new HashSet<Siebanalyse>(0); public Sohlprobe() { } public Sohlprobe(long sohlprobeid, Zzprobenahmeart zzprobenahmeart, Sohltest sohltest, Date lastupdated) { this.sohlprobeid = sohlprobeid; this.zzprobenahmeart = zzprobenahmeart; this.sohltest = sohltest; this.lastupdated = lastupdated; } public Sohlprobe(long sohlprobeid, Zzprobenahmeart zzprobenahmeart, Sohltest sohltest, BigDecimal tiefevon, BigDecimal tiefebis, String beschreibung, Date lastupdated, Set<Probebild> probebilds, Set<Siebanalyse> siebanalyses) { this.sohlprobeid = sohlprobeid; this.zzprobenahmeart = zzprobenahmeart; this.sohltest = sohltest; this.tiefevon = tiefevon; this.tiefebis = tiefebis; this.beschreibung = beschreibung; this.lastupdated = lastupdated; this.probebilds = probebilds; this.siebanalyses = siebanalyses; } @Id @Column(name="SOHLPROBEID", unique=true, nullable=false, precision=11, scale=0) public long getSohlprobeid() { return this.sohlprobeid; } public void setSohlprobeid(long sohlprobeid) { this.sohlprobeid = sohlprobeid; } @ManyToOne(fetch=FetchType.LAZY) @JoinColumn(name="PROBENAHMEARTID", nullable=false) public Zzprobenahmeart getZzprobenahmeart() { return this.zzprobenahmeart; } public void setZzprobenahmeart(Zzprobenahmeart zzprobenahmeart) { this.zzprobenahmeart = zzprobenahmeart; } @ManyToOne(fetch=FetchType.LAZY) @JoinColumn(name="SOHLTESTID", nullable=false) public Sohltest getSohltest() { return this.sohltest; } public void setSohltest(Sohltest sohltest) { this.sohltest = sohltest; } @Column(name="TIEFEVON", precision=8, scale=3) public BigDecimal getTiefevon() { return this.tiefevon; } public void setTiefevon(BigDecimal tiefevon) { this.tiefevon = tiefevon; } @Column(name="TIEFEBIS", precision=8, scale=3) public BigDecimal getTiefebis() { return this.tiefebis; } public void setTiefebis(BigDecimal tiefebis) { this.tiefebis = tiefebis; } @Column(name="BESCHREIBUNG", length=1024) public String getBeschreibung() { return this.beschreibung; } public void setBeschreibung(String beschreibung) { this.beschreibung = beschreibung; } @Temporal(TemporalType.DATE) @Column(name="LASTUPDATED", nullable=false, length=7) public Date getLastupdated() { return this.lastupdated; } public void setLastupdated(Date lastupdated) { this.lastupdated = lastupdated; } @OneToMany(fetch=FetchType.LAZY, mappedBy="sohlprobe") public Set<Probebild> getProbebilds() { return this.probebilds; } public void setProbebilds(Set<Probebild> probebilds) { this.probebilds = probebilds; } @OneToMany(fetch=FetchType.LAZY, mappedBy="sohlprobe") public Set<Siebanalyse> getSiebanalyses() { return this.siebanalyses; } public void setSiebanalyses(Set<Siebanalyse> siebanalyses) { this.siebanalyses = siebanalyses; } }