Mercurial > dive4elements > river
view flys-backend/src/main/java/de/intevation/seddb/model/Slotrechte.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.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; /** * Slotrechte generated by hbm2java */ @Entity @Table(name="SLOTRECHTE" ,schema="SEDDB" ) public class Slotrechte implements java.io.Serializable { private long slotrechteid; private Messung messung; private BigDecimal uferabst; private BigDecimal tsand; private BigDecimal tschweb; private BigDecimal fv; private BigDecimal vm; private BigDecimal tiefe; private BigDecimal vsohle; private String bemerkung; private BigDecimal uferablinks; private Set<Sprobe> sprobes = new HashSet<Sprobe>(0); public Slotrechte() { } public Slotrechte(long slotrechteid, Messung messung, BigDecimal uferabst) { this.slotrechteid = slotrechteid; this.messung = messung; this.uferabst = uferabst; } public Slotrechte(long slotrechteid, Messung messung, BigDecimal uferabst, BigDecimal tsand, BigDecimal tschweb, BigDecimal fv, BigDecimal vm, BigDecimal tiefe, BigDecimal vsohle, String bemerkung, BigDecimal uferablinks, Set<Sprobe> sprobes) { this.slotrechteid = slotrechteid; this.messung = messung; this.uferabst = uferabst; this.tsand = tsand; this.tschweb = tschweb; this.fv = fv; this.vm = vm; this.tiefe = tiefe; this.vsohle = vsohle; this.bemerkung = bemerkung; this.uferablinks = uferablinks; this.sprobes = sprobes; } @Id @Column(name="SLOTRECHTEID", unique=true, nullable=false, precision=11, scale=0) public long getSlotrechteid() { return this.slotrechteid; } public void setSlotrechteid(long slotrechteid) { this.slotrechteid = slotrechteid; } @ManyToOne(fetch=FetchType.LAZY) @JoinColumn(name="MESSUNGID", nullable=false) public Messung getMessung() { return this.messung; } public void setMessung(Messung messung) { this.messung = messung; } @Column(name="UFERABST", nullable=false, precision=8, scale=3) public BigDecimal getUferabst() { return this.uferabst; } public void setUferabst(BigDecimal uferabst) { this.uferabst = uferabst; } @Column(name="TSAND", precision=8, scale=3) public BigDecimal getTsand() { return this.tsand; } public void setTsand(BigDecimal tsand) { this.tsand = tsand; } @Column(name="TSCHWEB", precision=8, scale=3) public BigDecimal getTschweb() { return this.tschweb; } public void setTschweb(BigDecimal tschweb) { this.tschweb = tschweb; } @Column(name="FV", precision=6, scale=3) public BigDecimal getFv() { return this.fv; } public void setFv(BigDecimal fv) { this.fv = fv; } @Column(name="VM", precision=6, scale=4) public BigDecimal getVm() { return this.vm; } public void setVm(BigDecimal vm) { this.vm = vm; } @Column(name="TIEFE", precision=8, scale=3) public BigDecimal getTiefe() { return this.tiefe; } public void setTiefe(BigDecimal tiefe) { this.tiefe = tiefe; } @Column(name="VSOHLE", precision=6, scale=4) public BigDecimal getVsohle() { return this.vsohle; } public void setVsohle(BigDecimal vsohle) { this.vsohle = vsohle; } @Column(name="BEMERKUNG", length=240) public String getBemerkung() { return this.bemerkung; } public void setBemerkung(String bemerkung) { this.bemerkung = bemerkung; } @Column(name="UFERABLINKS", precision=8, scale=3) public BigDecimal getUferablinks() { return this.uferablinks; } public void setUferablinks(BigDecimal uferablinks) { this.uferablinks = uferablinks; } @OneToMany(fetch=FetchType.LAZY, mappedBy="slotrechte") public Set<Sprobe> getSprobes() { return this.sprobes; } public void setSprobes(Set<Sprobe> sprobes) { this.sprobes = sprobes; } }