com.imsweb.staging.entities.StagingTableRow Maven / Gradle / Ivy
/*
* Copyright (C) 2014 Information Management Services, Inc.
*/
package com.imsweb.staging.entities;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import org.mongodb.morphia.annotations.Embedded;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.imsweb.decisionengine.TableRow;
@Embedded
public class StagingTableRow implements TableRow {
@Embedded("inputs")
private Map> _inputs = new HashMap<>();
@Embedded("endpoints")
private List _endpoints = new ArrayList<>();
@Override
@JsonIgnore
public List getColumnInput(String key) {
return _inputs.get(key);
}
@JsonProperty("inputs")
public Map> getInputs() {
return _inputs;
}
public void setInputs(Map> inputs) {
_inputs = inputs;
}
/**
* Add a single columns input list
* @param key key
* @param range range
*/
public void addInput(String key, List range) {
_inputs.put(key, range);
}
@Override
@JsonProperty("endpoint")
public List getEndpoints() {
return _endpoints;
}
public void setEndpoints(List endpoints) {
_endpoints = endpoints;
}
public void addEndpoint(StagingEndpoint endpoint) {
_endpoints.add(endpoint);
}
}