view gwt-client/src/main/java/org/dive4elements/river/client/shared/model/FacetRecord.java @ 9709:b74f817435fe

comment removed
author dnt_bjoernsen <d.tironi@bjoernsen.de>
date Wed, 27 Jan 2021 11:47:38 +0100
parents 05405292a7ca
children
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.client.shared.model;

import com.smartgwt.client.widgets.grid.ListGridRecord;

/**
 * ListGridRecord for Facets.
 *
 * @author <a href="mailto:ingo.weinzierl@intevation.de">Ingo Weinzierl</a>
 */
public final class FacetRecord extends ListGridRecord {

    /** Underlying theme. */
    private final Theme theme;

    public FacetRecord(final Theme theme) {
        this.theme = theme;

        setActive(theme.getActive() == 1);
        setName(theme.getDescription());
    }

    public Theme getTheme() {
        return this.theme;
    }

    public void setName(final String description) {
        setAttribute("name", description);
    }

    public String getName() {
        return getAttribute("name");
    }

    public boolean getActive() {
        return getAttributeAsBoolean("active");
    }

    public void setActive(final boolean active) {
        setAttribute("active", active);
    }
}

http://dive4elements.wald.intevation.org