package com.infoclinika.pdx.projection;

import com.infoclinika.pdx.domain.sample.SampleType;

import java.util.List;
import java.util.Map;
import java.util.Objects;

/**
 * Projection for pathway records summary.
 */
public class PathwaySummaryDto {
    private String pathway;
    private Map<SampleType, List<Double>> values;

    /**
     * Initializes all fields.
     */
    public PathwaySummaryDto(String pathway, Map<SampleType, List<Double>> values) {
        this.pathway = pathway;
        this.values = values;
    }

    public String getPathway() {
        return pathway;
    }

    public void setPathway(String pathway) {
        this.pathway = pathway;
    }

    public Map<SampleType, List<Double>> getValues() {
        return values;
    }

    public void setValues(Map<SampleType, List<Double>> values) {
        this.values = values;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) {
            return true;
        }
        if (o == null || getClass() != o.getClass()) {
            return false;
        }
        final PathwaySummaryDto that = (PathwaySummaryDto) o;
        return Objects.equals(getPathway(), that.getPathway())
               && Objects.equals(getValues(), that.getValues());
    }

    @Override
    public int hashCode() {
        return Objects.hash(getPathway(), getValues());
    }

    @Override
    public String toString() {
        return "PathwaySummaryDto{"
               + "pathway=" + pathway
               + ", values=" + values
               + '}';
    }
}
