com.imsweb.staging.entities.StagingTablePath Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of staging-client-java Show documentation
Show all versions of staging-client-java Show documentation
A cancer staging client library
/*
* Copyright (C) 2014 Information Management Services, Inc.
*/
package com.imsweb.staging.entities;
import java.util.LinkedHashSet;
import java.util.Objects;
import java.util.Set;
import org.mongodb.morphia.annotations.Embedded;
import org.mongodb.morphia.annotations.Property;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import com.imsweb.decisionengine.TablePath;
@JsonPropertyOrder({"id", "input_mapping", "output_mapping", "inputs", "outputs"})
@Embedded
public class StagingTablePath implements TablePath {
@Property("id")
private String _id;
@Embedded("input_mapping")
private Set _inputMapping;
@Embedded("output_mapping")
private Set _outputMapping;
@Embedded("inputs")
private Set _inputs;
@Embedded("outputs")
private Set _outputs;
/**
* Morphia requires a default constructor
*/
public StagingTablePath() {
}
public StagingTablePath(String id) {
setId(id);
}
@Override
@JsonProperty("id")
public String getId() {
return _id;
}
public void setId(String id) {
_id = id;
}
@Override
@JsonProperty("input_mapping")
public Set getInputMapping() {
return _inputMapping;
}
@JsonDeserialize(as = LinkedHashSet.class)
public void setInputMapping(Set input) {
_inputMapping = input;
}
@Override
@JsonProperty("output_mapping")
public Set getOutputMapping() {
return _outputMapping;
}
@JsonDeserialize(as = LinkedHashSet.class)
public void setOutputMapping(Set output) {
_outputMapping = output;
}
@JsonProperty("inputs")
public Set getInputs() {
return _inputs;
}
@JsonDeserialize(as = LinkedHashSet.class)
public void setInputs(Set inputs) {
_inputs = inputs;
}
@JsonProperty("outputs")
public Set getOutputs() {
return _outputs;
}
@JsonDeserialize(as = LinkedHashSet.class)
public void setOutputs(Set outputs) {
_outputs = outputs;
}
@Override
public boolean equals(Object o) {
if (this == o)
return true;
if (o == null || getClass() != o.getClass())
return false;
StagingTablePath that = (StagingTablePath)o;
return Objects.equals(_id, that._id) &&
Objects.equals(_inputMapping, that._inputMapping) &&
Objects.equals(_inputs, that._inputs) &&
Objects.equals(_outputMapping, that._outputMapping) &&
Objects.equals(_outputs, that._outputs);
}
@Override
public int hashCode() {
return Objects.hash(_id, _inputMapping, _inputs, _outputMapping, _outputs);
}
}