package org.redmine.ta.beans;

/**
 * Redmine custom field
 *
 * @author Yuri Lupol
 */
public class CustomField {

    private int id;
    private String name;
    private String value;

    /**
     * This default empty constructor is required for Castor XML library.
     */
    public CustomField() {
    }

    public CustomField(int id, String name, String value) {
        this.id = id;
        this.name = name;
        this.value = value;
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getValue() {
        return value;
    }

    public void setValue(String value) {
        this.value = value;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o)
            return true;
        if (o == null || getClass() != o.getClass())
            return false;

        CustomField that = (CustomField) o;

        if (id != that.id)
            return false;
        if (name != null ? !name.equals(that.name) : that.name != null)
            return false;
        if (value != null ? !value.equals(that.value) : that.value != null)
            return false;

        return true;
    }

    @Override
    public int hashCode() {
        int result = id;
        result = 31 * result + (name != null ? name.hashCode() : 0);
        result = 31 * result + (value != null ? value.hashCode() : 0);
        return result;
    }

    @Override
    public String toString() {
        return "CustomField{" + "id=" + id + ", name='" + name + '\''
                + ", value='" + value + '\'' + '}';
    }
}

@@ -24,16 +24,45 @@
 beans;%0A%0A
+import java.util.ArrayList;%0A%0A
 /**%0A * R
@@ -208,16 +208,92 @@
 g value;
+%0A    private boolean multiple = false;%0A    private ArrayList%3CString%3E values;
 %0A%0A    /*
@@ -920,29 +920,468 @@
 ue = value;%0A
-
     %7D
+%0A    %0A%09/**%0A%09 * @return the values%0A%09 */%0A%09public ArrayList%3CString%3E getValues() %7B%0A%09%09return values;%0A%09%7D%0A%0A%09/**%0A%09 * @param values the values to set%0A%09 */%0A%09public void setValues(ArrayList%3CString%3E values) %7B%0A%09%09this.values = values;%0A%09%7D%0A%0A%09/**%0A%09 * @return the multiple%0A%09 */%0A%09public boolean isMultiple() %7B%0A%09%09return multiple;%0A%09%7D%0A%0A%09/**%0A%09 * @param multiple the multiple to set%0A%09 */%0A%09public void setMultiple(boolean multiple) %7B%0A%09%09this.multiple = multiple;%0A%09%7D
 %0A%0A    @Overr

add List of Strings... an so on..