All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.github.rauberprojects.client.model.Data Maven / Gradle / Ivy

package com.github.rauberprojects.client.model;

import java.util.ArrayList;
import java.util.List;

public class Data {

    private String id;
    private String name;
    private List rel = new ArrayList();
    private String url;
    private boolean templated;
    private String label;
    private String action;
    private String transclude;
    private String model;
    private List sending = new ArrayList();
    private List accepting = new ArrayList();
    private String value;
    private List data = new ArrayList();

    public Data() { }

    public Data(Data other) {
        this.id = other.id;
        this.name = other.name;
        this.rel = new ArrayList(other.rel);
        this.url = other.url;
        this.templated = other.templated;
        this.label = other.label;
        this.action = other.action;
        this.transclude = other.transclude;
        this.model = other.model;
        this.sending = new ArrayList(other.sending);
        this.accepting = new ArrayList(other.accepting);
        this.value = other.value;
        this.data = Utils.deepCopyDataList(other.data);
    }

    public String getId() {
        return id;
    }

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

    public String getName() {
        return name;
    }

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

    public List getRel() {
        return rel;
    }

    public void setRel(List rel) {
        this.rel = rel;
    }

    public String getUrl() {
        return url;
    }

    public void setUrl(String url) {
        this.url = url;
    }

    public boolean isTemplated() {
        return templated;
    }

    public void setTemplated(boolean templated) {
        this.templated = templated;
    }

    public String getLabel() {
        return label;
    }

    public void setLabel(String label) {
        this.label = label;
    }

    public String getAction() {
        return action;
    }

    public void setAction(String action) {
        this.action = action;
    }

    public String getTransclude() {
        return transclude;
    }

    public void setTransclude(String transclude) {
        this.transclude = transclude;
    }

    public String getModel() {
        return model;
    }

    public void setModel(String model) {
        this.model = model;
    }

    public List getSending() {
        return sending;
    }

    public void setSending(List sending) {
        this.sending = sending;
    }

    public List getAccepting() {
        return accepting;
    }

    public void setAccepting(List accepting) {
        this.accepting = accepting;
    }

    public String getValue() {
        return value;
    }

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

    public List getData() {
        return data;
    }

    public void setData(List data) {
        this.data = data;
    }

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

        Data data1 = (Data) o;

        if (templated != data1.templated) return false;
        if (id != null ? !id.equals(data1.id) : data1.id != null) return false;
        if (name != null ? !name.equals(data1.name) : data1.name != null) return false;
        if (rel != null ? !rel.equals(data1.rel) : data1.rel != null) return false;
        if (url != null ? !url.equals(data1.url) : data1.url != null) return false;
        if (label != null ? !label.equals(data1.label) : data1.label != null) return false;
        if (action != null ? !action.equals(data1.action) : data1.action != null) return false;
        if (transclude != null ? !transclude.equals(data1.transclude) : data1.transclude != null) return false;
        if (model != null ? !model.equals(data1.model) : data1.model != null) return false;
        if (sending != null ? !sending.equals(data1.sending) : data1.sending != null) return false;
        if (accepting != null ? !accepting.equals(data1.accepting) : data1.accepting != null) return false;
        if (value != null ? !value.equals(data1.value) : data1.value != null) return false;
        return !(data != null ? !data.equals(data1.data) : data1.data != null);

    }

    @Override
    public int hashCode() {
        int result = id != null ? id.hashCode() : 0;
        result = 31 * result + (name != null ? name.hashCode() : 0);
        result = 31 * result + (rel != null ? rel.hashCode() : 0);
        result = 31 * result + (url != null ? url.hashCode() : 0);
        result = 31 * result + (templated ? 1 : 0);
        result = 31 * result + (label != null ? label.hashCode() : 0);
        result = 31 * result + (action != null ? action.hashCode() : 0);
        result = 31 * result + (transclude != null ? transclude.hashCode() : 0);
        result = 31 * result + (model != null ? model.hashCode() : 0);
        result = 31 * result + (sending != null ? sending.hashCode() : 0);
        result = 31 * result + (accepting != null ? accepting.hashCode() : 0);
        result = 31 * result + (value != null ? value.hashCode() : 0);
        result = 31 * result + (data != null ? data.hashCode() : 0);
        return result;
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy