view flys-client/src/main/java/de/intevation/flys/client/shared/model/FixingsOverviewInfo.java @ 5200:42bb6ff78d1b 2.9.11

Directly set the connectionInitSqls on the datasource Somehow the factory fails to set the connectionInitSqls if we add it to the dbcpProperties. So we now set it directly
author Andre Heinecke <aheinecke@intevation.de>
date Fri, 08 Mar 2013 11:48:33 +0100
parents 256b458cc7ea
children
line wrap: on
line source
package de.intevation.flys.client.shared.model;

import java.io.Serializable;

import java.util.List;
import java.util.ArrayList;

public class FixingsOverviewInfo implements Serializable {

    protected List<FixEvent> events;
    protected String river;
    protected double from;
    protected double to;
    protected int rid;
    protected String html;

    protected FixingsOverviewInfo() {}

    public FixingsOverviewInfo(
        int rid,
        String river,
        double from,
        double to,
        List<FixEvent> events,
        String html
    ) {
        this.rid = rid;
        this.river = river;
        this.from = from;
        this.to = to;
        this.events = new ArrayList<FixEvent>(events);
        this.html = html;
    }

    public int getRId() {
        return this.rid;
    }

    public String getRiver() {
        return this.river;
    }

    public double getFrom() {
        return this.from;
    }

    public double getTo() {
        return this.to;
    }

    public List<FixEvent> getEvents() {
        return this.events;
    }

    public FixEvent getEventByCId(String cid) {
        for (int i = 0; i < events.size(); i++) {
            if (events.get(i).getCId().equals(cid)) {
                return events.get(i);
            }
        }
        return null;
    }

    public String getHTML() {
        return this.html;
    }


    public static class FixEvent implements Serializable {
        protected String cid;
        protected String date;
        protected String description;
        protected List<Sector> sectors;

        protected FixEvent () {}

        public FixEvent(
            String cid,
            String date,
            String description,
            List<Sector> sectors
        ) {
            this.cid = cid;
            this.date = date;
            this.description = description;
            this.sectors = new ArrayList<Sector>(sectors);
        }

        public String getCId() {
            return this.cid;
        }

        public String getDate() {
            return this.date;
        }

        public String getDescription() {
            return this.description;
        }

        public List<Sector> getSectors() {
            return this.sectors;
        }
    }

    public static class Sector implements Serializable {
        protected int cls;
        protected double from;
        protected double to;

        protected Sector () {}

        public Sector(
            int cls,
            double from,
            double to
        ) {
            this.cls = cls;
            this.from = from;
            this.to = to;
        }

        public int getCls() {
            return this.cls;
        }

        public double getFrom() {
            return this.from;
        }

        public double getTo() {
            return this.to;
        }
    }
}
// vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 :

http://dive4elements.wald.intevation.org