SubShipmentDTO.java

package com.tradecloud.dto.api.shipment;

import com.fasterxml.jackson.annotation.JsonProperty;
import com.tradecloud.dto.api.EventDTO;

import java.util.Date;
import java.util.List;
import java.util.Objects;

public class SubShipmentDTO {
    private String shipmentReference;

    private String reference;

    private List<String> orderReferences;
    @JsonProperty(access = JsonProperty.Access.AUTO)
    private  String state;
    @JsonProperty(access = JsonProperty.Access.AUTO)
    List<EventDTO> eventDTOList;

    private String houseBillOfLadingReference;
    private Date houseBillOfLadingDate;

    protected List<AddedCommentDTO> comments;

    public String getReference() {
        return reference;
    }

    public void setReference(String reference) {
        this.reference = reference;
    }

    public List<String> getOrderReferences() {
        return orderReferences;
    }

    public void setOrderReferences(List<String> orderReferences) {
        this.orderReferences = orderReferences;
    }

    public List<EventDTO> getEventDTOList() {
        return eventDTOList;
    }

    public void setEventDTOList(List<EventDTO> eventDTOList) {
        this.eventDTOList = eventDTOList;
    }

    public String getState() {
        return state;
    }

    public void setState(String state) {
        this.state = state;
    }

    public List<AddedCommentDTO> getComments() {
        return comments;
    }

    public void setComments(List<AddedCommentDTO> comments) {
        this.comments = comments;
    }

    public String getShipmentReference() {
        return shipmentReference;
    }

    public void setShipmentReference(String shipmentReference) {
        this.shipmentReference = shipmentReference;
    }

    public String getHouseBillOfLadingReference() {
        return houseBillOfLadingReference;
    }

    public void setHouseBillOfLadingReference(String houseBillOfLadingReference) {
        this.houseBillOfLadingReference = houseBillOfLadingReference;
    }

    public Date getHouseBillOfLadingDate() {
        return houseBillOfLadingDate;
    }

    public void setHouseBillOfLadingDate(Date houseBillOfLadingDate) {
        this.houseBillOfLadingDate = houseBillOfLadingDate;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        SubShipmentDTO that = (SubShipmentDTO) o;
        return Objects.equals(shipmentReference, that.shipmentReference) &&
                Objects.equals(reference, that.reference);
    }

    @Override
    public int hashCode() {
        return Objects.hash(shipmentReference, reference);
    }
}