/******************************************************************************** | |
* Copyright (c) 2015-2018 Contributors to the Eclipse Foundation | |
* | |
* See the NOTICE file(s) distributed with this work for additional | |
* information regarding copyright ownership. | |
* | |
* This program and the accompanying materials are made available under the | |
* terms of the Eclipse Public License v. 2.0 which is available at | |
* http://www.eclipse.org/legal/epl-2.0. | |
* | |
* SPDX-License-Identifier: EPL-2.0 | |
* | |
********************************************************************************/ | |
package org.eclipse.mdm.shoppingbasket.entity; | |
import java.util.List; | |
import javax.xml.bind.annotation.XmlElement; | |
import javax.xml.bind.annotation.XmlElementWrapper; | |
import javax.xml.bind.annotation.XmlRootElement; | |
import javax.xml.bind.annotation.XmlType; | |
/** | |
* ShoppingBasket contains a list of item and an optional name. | |
* | |
*/ | |
@XmlRootElement(name = "shoppingbasket") | |
@XmlType(propOrder = { "name", "items" }) | |
public class ShoppingBasket { | |
private String name; | |
private List<BasketItem> items; | |
/** | |
* @return the name | |
*/ | |
@XmlElement(name = "name") | |
public String getName() { | |
return name; | |
} | |
/** | |
* @param name | |
* the name to set | |
*/ | |
public void setName(String name) { | |
this.name = name; | |
} | |
/** | |
* @return the items | |
*/ | |
@XmlElementWrapper(name = "items") | |
@XmlElement(name = "item") | |
public List<BasketItem> getItems() { | |
return items; | |
} | |
/** | |
* @param items | |
* the items to set | |
*/ | |
public void setItems(List<BasketItem> items) { | |
this.items = items; | |
} | |
} |