Mercurial > dive4elements > river
view flys-backend/src/main/java/de/intevation/seddb/model/Probebild.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.Column; import javax.persistence.Entity; import javax.persistence.FetchType; import javax.persistence.Id; import javax.persistence.JoinColumn; import javax.persistence.ManyToOne; import javax.persistence.Table; /** * Probebild generated by hbm2java */ @Entity @Table(name="PROBEBILD" ,schema="SEDDB" ) public class Probebild implements java.io.Serializable { private long probebildid; private Zzthema zzthema; private Sohlprobe sohlprobe; private int lfdnr; private boolean istdigital; private String pfad; private String standort; private String medium; private String medpfad; private String bemerkung; private String typklein; private String typmittel; private String typgross; public Probebild() { } public Probebild(long probebildid, Zzthema zzthema, Sohlprobe sohlprobe, int lfdnr, boolean istdigital) { this.probebildid = probebildid; this.zzthema = zzthema; this.sohlprobe = sohlprobe; this.lfdnr = lfdnr; this.istdigital = istdigital; } public Probebild(long probebildid, Zzthema zzthema, Sohlprobe sohlprobe, int lfdnr, boolean istdigital, String pfad, String standort, String medium, String medpfad, String bemerkung, String typklein, String typmittel, String typgross) { this.probebildid = probebildid; this.zzthema = zzthema; this.sohlprobe = sohlprobe; this.lfdnr = lfdnr; this.istdigital = istdigital; this.pfad = pfad; this.standort = standort; this.medium = medium; this.medpfad = medpfad; this.bemerkung = bemerkung; this.typklein = typklein; this.typmittel = typmittel; this.typgross = typgross; } @Id @Column(name="PROBEBILDID", unique=true, nullable=false, precision=11, scale=0) public long getProbebildid() { return this.probebildid; } public void setProbebildid(long probebildid) { this.probebildid = probebildid; } @ManyToOne(fetch=FetchType.LAZY) @JoinColumn(name="THEMAID", nullable=false) public Zzthema getZzthema() { return this.zzthema; } public void setZzthema(Zzthema zzthema) { this.zzthema = zzthema; } @ManyToOne(fetch=FetchType.LAZY) @JoinColumn(name="SOHLPROBEID", nullable=false) public Sohlprobe getSohlprobe() { return this.sohlprobe; } public void setSohlprobe(Sohlprobe sohlprobe) { this.sohlprobe = sohlprobe; } @Column(name="LFDNR", nullable=false, precision=5, scale=0) public int getLfdnr() { return this.lfdnr; } public void setLfdnr(int lfdnr) { this.lfdnr = lfdnr; } @Column(name="ISTDIGITAL", nullable=false, precision=1, scale=0) public boolean isIstdigital() { return this.istdigital; } public void setIstdigital(boolean istdigital) { this.istdigital = istdigital; } @Column(name="PFAD", length=512) public String getPfad() { return this.pfad; } public void setPfad(String pfad) { this.pfad = pfad; } @Column(name="STANDORT", length=50) public String getStandort() { return this.standort; } public void setStandort(String standort) { this.standort = standort; } @Column(name="MEDIUM", length=50) public String getMedium() { return this.medium; } public void setMedium(String medium) { this.medium = medium; } @Column(name="MEDPFAD", length=50) public String getMedpfad() { return this.medpfad; } public void setMedpfad(String medpfad) { this.medpfad = medpfad; } @Column(name="BEMERKUNG", length=240) public String getBemerkung() { return this.bemerkung; } public void setBemerkung(String bemerkung) { this.bemerkung = bemerkung; } @Column(name="TYPKLEIN", length=8) public String getTypklein() { return this.typklein; } public void setTypklein(String typklein) { this.typklein = typklein; } @Column(name="TYPMITTEL", length=8) public String getTypmittel() { return this.typmittel; } public void setTypmittel(String typmittel) { this.typmittel = typmittel; } @Column(name="TYPGROSS", length=8) public String getTypgross() { return this.typgross; } public void setTypgross(String typgross) { this.typgross = typgross; } }