nl.vpro.domain.api.MultipleEntry Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of api-domain Show documentation
Show all versions of api-domain Show documentation
Contains the objects used by the Frontend API, like forms and result objects
package nl.vpro.domain.api;
import lombok.Data;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlType;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
import nl.vpro.domain.constraint.PredicateTestResult;
/**
* @author Michiel Meeuwissen
* @since 3.3
*/
@XmlAccessorType(XmlAccessType.NONE)
@Data
@XmlType(propOrder = {"id", "result", "error", "reason"})
@JsonPropertyOrder({"id", "result", "error", "reason"})
public class MultipleEntry {
@XmlElement
private String id;
@XmlElement
private T result;
@XmlElement
private String error;
@XmlElement
private PredicateTestResult reason;
public MultipleEntry(String id, T object) {
this.result = object;
this.id = id;
this.error = object == null ? "Not found " + id : null;
}
public MultipleEntry() {
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy