view flys-backend/src/main/java/de/intevation/seddb/model/Sohlprobe.java @ 5779:ebec12def170

Datacage: Add a pool of builders to make it multi threadable. XML DOM is not thread safe. Therefore the old implementation only allowed one thread to use the builder at a time. As the complexity of the configuration has increased over time this has become a bottleneck of the whole application because it took quiet some time to build a result. Furthermore the builder code path is visited very frequent. So many concurrent requests were piled up resulting in long waits for the users. To mitigate this problem a round robin pool of builders is used now. Each of the pooled builders has an independent copy of the XML template and can be run in parallel. The number of builders is determined by the system property 'flys.datacage.pool.size'. It defaults to 4.
author Sascha L. Teichmann <teichmann@intevation.de>
date Sun, 21 Apr 2013 12:48:09 +0200
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;
    }




}


http://dive4elements.wald.intevation.org