teichmann@5861: /* Copyright (C) 2011, 2012, 2013 by Bundesanstalt für Gewässerkunde teichmann@5861: * Software engineering by Intevation GmbH teichmann@5861: * teichmann@5993: * This file is Free Software under the GNU AGPL (>=v3) teichmann@5861: * and comes with ABSOLUTELY NO WARRANTY! Check out the teichmann@5993: * documentation coming with Dive4Elements River for details. teichmann@5861: */ teichmann@5861: teichmann@5835: package org.dive4elements.river.client.shared.model; ingo@523: ingo@523: import com.smartgwt.client.widgets.grid.ListGridRecord; ingo@523: ingo@523: /** felix@3509: * ListGridRecord for Facets. gernotbelger@9416: * ingo@523: * @author Ingo Weinzierl ingo@523: */ gernotbelger@9416: public final class FacetRecord extends ListGridRecord { ingo@523: felix@4147: /** Underlying theme. */ gernotbelger@9416: private final Theme theme; ingo@523: gernotbelger@9416: public FacetRecord(final Theme theme) { ingo@524: this.theme = theme; ingo@523: ingo@804: setActive(theme.getActive() == 1); ingo@575: setName(theme.getDescription()); ingo@523: } ingo@523: ingo@524: public Theme getTheme() { gernotbelger@9416: return this.theme; ingo@523: } ingo@523: gernotbelger@9416: public void setName(final String description) { ingo@575: setAttribute("name", description); ingo@523: } ingo@523: ingo@523: public String getName() { ingo@523: return getAttribute("name"); ingo@523: } ingo@523: ingo@523: public boolean getActive() { ingo@523: return getAttributeAsBoolean("active"); ingo@523: } ingo@523: gernotbelger@9416: public void setActive(final boolean active) { ingo@523: setAttribute("active", active); ingo@523: } gernotbelger@9416: }