view backend/src/main/java/org/dive4elements/river/backend/Credentials.java @ 8443:df65f24af5bc

(issue1762) Use getValue to obtain dateRange values The getToValue was always the initial value regardless of what has been entered in the form. According to the documentation both getToValue and getFromValue should return the "initial value" of the form field. But wether this means the value before validation corrections or the value the field is initialized with (which is also not true in both cases as the field is set only after creation) It returned the real value for the from date but not for the to date. With an explicit getValue we workaround this issue.
author Andre Heinecke <andre.heinecke@intevation.de>
date Wed, 22 Oct 2014 17:33:43 +0200
parents 4c3ccf2b0304
children c5a7aae52396
line wrap: on
line source
/* Copyright (C) 2011, 2012, 2013 by Bundesanstalt für Gewässerkunde
 * Software engineering by Intevation GmbH
 *
 * This file is Free Software under the GNU AGPL (>=v3)
 * and comes with ABSOLUTELY NO WARRANTY! Check out the
 * documentation coming with Dive4Elements River for details.
 */

package org.dive4elements.river.backend;

public abstract class Credentials
{
    protected String   user;
    protected String   password;
    protected String   dialect;
    protected String   driver;
    protected String   url;
    protected String   connectionInitSqls;
    protected Class [] classes;

    public Credentials() {
    }

    public Credentials(
        String   user,
        String   password,
        String   dialect,
        String   driver,
        String   url,
        String   connectionInitSqls,
        Class [] classes
    ) {
        this.user               = user;
        this.password           = password;
        this.dialect            = dialect;
        this.driver             = driver;
        this.url                = url;
        this.connectionInitSqls = connectionInitSqls;
        this.classes            = classes;
    }

    public String getUser() {
        return user;
    }

    public void setUser(String user) {
        this.user = user;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public String getDialect() {
        return dialect;
    }

    public void setDialect(String dialect) {
        this.dialect = dialect;
    }

    public String getDriver() {
        return driver;
    }

    public void setDriver(String driver) {
        this.driver = driver;
    }

    public String getUrl() {
        return url;
    }

    public void setUrl(String url) {
        this.url = url;
    }

    public String getConnectionInitSqls() {
        return connectionInitSqls;
    }

    public void setConnectionInitSqls(String connectionInitSqls) {
        this.connectionInitSqls = connectionInitSqls;
    }

    public Class [] getClasses() {
        return classes;
    }

    public void setClasses(Class [] classes) {
        this.classes = classes;
    }
}
// vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 :

http://dive4elements.wald.intevation.org