view src/main/java/de/intevation/lada/importer/ReportItem.java @ 614:d51d0418d027

Updated importer response item to take objects as value.
author Raimund Renkert <raimund.renkert@intevation.de>
date Fri, 17 Apr 2015 13:17:45 +0200
parents e35f047f019f
children 9e733f44d8b0
line wrap: on
line source
package de.intevation.lada.importer;

/**
 * Container for error or warning messages send to the client.
 *
 * Errors and warnings are specified by the key-value pair that caused the problem and a code.
 * The code can be
 * 670: Parser error
 * 671: existing
 * 672: duplicated entry
 * 673: missing
 * 674: date error
 * or any validation code.
 *
 * @author <a href="mailto:rrenkert@intevation.de">Raimund Renkert</a>
 */
public class ReportItem
{
    private String key;
    private Object value;
    private Integer code;

    /**
     * Default constructor.
     */
    public ReportItem() {
    }

    /**
     * Constructor to create a {@link ReportItem} object with data.
     * @param key   The key caused the error/warning.
     * @param value The value caused the error/warning.
     * @param code  The code specifying the error/warning.
     */
    public ReportItem(String key, Object value, Integer code) {
        this.key = key;
        this.value = value;
        this.code = code;
    }

    /**
     * @return the key
     */
    public String getKey() {
        return key;
    }

    /**
     * @param key the key to set
     */
    public void setKey(String key) {
        this.key = key;
    }

    /**
     * @return the value
     */
    public Object getValue() {
        return value;
    }

    /**
     * @param value the value to set
     */
    public void setValue(String value) {
        this.value = value;
    }

    /**
     * @return the code
     */
    public Integer getCode() {
        return code;
    }

    /**
     * @param code the code to set
     */
    public void setCode(Integer code) {
        this.code = code;
    }
}
This site is hosted by Intevation GmbH (Datenschutzerklärung und Impressum | Privacy Policy and Imprint)