Mercurial > dive4elements > river
view flys-backend/src/main/java/de/intevation/seddb/model/Glotlinks.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 javax.persistence.AttributeOverride; import javax.persistence.AttributeOverrides; import javax.persistence.Column; import javax.persistence.EmbeddedId; import javax.persistence.Entity; import javax.persistence.Table; /** * Glotlinks generated by hbm2java */ @Entity @Table(name="GLOTLINKS" ,schema="SEDDB" ) public class Glotlinks implements java.io.Serializable { private GlotlinksId id; public Glotlinks() { } public Glotlinks(GlotlinksId id) { this.id = id; } @EmbeddedId @AttributeOverrides( { @AttributeOverride(name="glotrechteid", column=@Column(name="GLOTRECHTEID", nullable=false, precision=11, scale=0) ), @AttributeOverride(name="messungid", column=@Column(name="MESSUNGID", nullable=false, precision=11, scale=0) ), @AttributeOverride(name="uferabst", column=@Column(name="UFERABST", nullable=false, precision=8, scale=3) ), @AttributeOverride(name="tgeschiebe", column=@Column(name="TGESCHIEBE", precision=8, scale=3) ), @AttributeOverride(name="dm", column=@Column(name="DM", precision=7, scale=4) ), @AttributeOverride(name="sk", column=@Column(name="SK", precision=8, scale=3) ), @AttributeOverride(name="so", column=@Column(name="SO", precision=8, scale=3) ), @AttributeOverride(name="u", column=@Column(name="U", precision=8, scale=3) ), @AttributeOverride(name="d90", column=@Column(name="D90", precision=7, scale=4) ), @AttributeOverride(name="d84", column=@Column(name="D84", precision=7, scale=4) ), @AttributeOverride(name="d80", column=@Column(name="D80", precision=7, scale=4) ), @AttributeOverride(name="d75", column=@Column(name="D75", precision=7, scale=4) ), @AttributeOverride(name="d70", column=@Column(name="D70", precision=7, scale=4) ), @AttributeOverride(name="d60", column=@Column(name="D60", precision=7, scale=4) ), @AttributeOverride(name="d50", column=@Column(name="D50", precision=7, scale=4) ), @AttributeOverride(name="d40", column=@Column(name="D40", precision=7, scale=4) ), @AttributeOverride(name="d30", column=@Column(name="D30", precision=7, scale=4) ), @AttributeOverride(name="d25", column=@Column(name="D25", precision=7, scale=4) ), @AttributeOverride(name="d20", column=@Column(name="D20", precision=7, scale=4) ), @AttributeOverride(name="d16", column=@Column(name="D16", precision=7, scale=4) ), @AttributeOverride(name="d10", column=@Column(name="D10", precision=7, scale=4) ), @AttributeOverride(name="dmin", column=@Column(name="DMIN", precision=7, scale=4) ), @AttributeOverride(name="durchdmin", column=@Column(name="DURCHDMIN", precision=6, scale=3) ), @AttributeOverride(name="dmax", column=@Column(name="DMAX", precision=7, scale=4) ), @AttributeOverride(name="durchdmax", column=@Column(name="DURCHDMAX", precision=6, scale=3) ), @AttributeOverride(name="stdabw", column=@Column(name="STDABW", precision=8, scale=3) ), @AttributeOverride(name="stdfehler", column=@Column(name="STDFEHLER", precision=8, scale=3) ), @AttributeOverride(name="bemerkung", column=@Column(name="BEMERKUNG", length=240) ), @AttributeOverride(name="uferablinks", column=@Column(name="UFERABLINKS", precision=8, scale=3) ), @AttributeOverride(name="linksabst", column=@Column(name="LINKSABST", precision=22, scale=0) ) } ) public GlotlinksId getId() { return this.id; } public void setId(GlotlinksId id) { this.id = id; } }