view flys-client/src/main/java/de/intevation/flys/client/shared/model/ToLoad.java @ 822:ffb98b228b3c

Add code to extract data to load from datacage tree. flys-client/trunk@2493 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Sascha L. Teichmann <sascha.teichmann@intevation.de>
date Fri, 12 Aug 2011 15:51:51 +0000
parents
children 2f65c742803f
line wrap: on
line source
package de.intevation.flys.client.shared.model;

import java.io.Serializable;

public class ToLoad implements Serializable
{
    protected String artifactId;
    protected String ids;
    protected String factory;
    protected String num;

    public ToLoad() {
    }

    public ToLoad(
        String factory,
        String artifactId, 
        String ids, 
        String num
    ) {
        this.factory    = factory;
        this.artifactId = artifactId;
        this.ids        = ids;
        this.num        = num;
    }

    public String getArtifactId() {
        return artifactId;
    }

    public void setArtifactId(String artifactId) {
        this.artifactId = artifactId;
    }

    public String getIds() {
        return ids;
    }

    public void setIds(String ids) {
        this.ids = ids;
    }

    public String getFactory() {
        return factory;
    }

    public void setFactory(String factory) {
        this.factory = factory;
    }

    public String getNum() {
        return num;
    }

    public void setNum(String num) {
        this.num = num;
    }

    private static final boolean equals(String a, String b) {
        if ((a == null && b != null) || (a != null && b == null)) {
            return false;
        }
        return (a == null && b == null) || a.equals(b);
    }

    @Override
    public boolean equals(Object other) {
        if (!(other instanceof ToLoad)) {
            return false;
        }
        ToLoad o = (ToLoad)other;
        return equals(factory,    o.factory)
            && equals(artifactId, o.artifactId)
            && equals(ids,        o.ids)
            && equals(num,        o.num);
    }

    public String toString() {
        StringBuilder sb = new StringBuilder("[")
          .append("factory='").append(factory).append("', artifactId='")
          .append(artifactId).append("', ids='").append(ids)
          .append("', num='").append(num).append("']");
        return sb.toString();
    }
}
// vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 :

http://dive4elements.wald.intevation.org