ConsignmentDTO.java

package com.tradecloud.dto.consignment;

import java.util.List;

import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlElementWrapper;
import javax.xml.bind.annotation.XmlRootElement;

import com.tradecloud.dto.order.OrderDTO;

@XmlRootElement(name = "consignmentDTO")
@XmlAccessorType(XmlAccessType.FIELD)
public class ConsignmentDTO {

    @XmlAttribute
    private String reference;

    @XmlElementWrapper(name = "orders")
    @XmlElement(name = "orderDTO")
    private List<OrderDTO> orders;

    @XmlElementWrapper(name = "containers")
    @XmlElement(name = "containerDTO")
    private List<ContainerDTO> containers;

    public String getReference() {
        return reference;
    }

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

    public List<OrderDTO> getOrders() {
        return orders;
    }

    public void setOrders(List<OrderDTO> orders) {
        this.orders = orders;
    }

    public List<ContainerDTO> getContainers() {
        return containers;
    }

    public void setContainers(List<ContainerDTO> containers) {
        this.containers = containers;
    }
}