001/* 002 * Copyright (C) 2014 konik.io 003 * 004 * This file is part of Konik library. 005 * 006 * Konik library is free software: you can redistribute it and/or modify 007 * it under the terms of the GNU Affero General Public License as published by 008 * the Free Software Foundation, either version 3 of the License, or 009 * (at your option) any later version. 010 * 011 * Konik library is distributed in the hope that it will be useful, 012 * but WITHOUT ANY WARRANTY; without even the implied warranty of 013 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 014 * GNU Affero General Public License for more details. 015 * 016 * You should have received a copy of the GNU Affero General Public License 017 * along with Konik library. If not, see <http://www.gnu.org/licenses/>. 018 */ 019package io.konik.zugferd.entity.trade.item; 020 021import io.konik.zugferd.entity.Document; 022import io.konik.zugferd.entity.Product; 023 024import javax.validation.Valid; 025import javax.xml.bind.annotation.XmlAccessType; 026import javax.xml.bind.annotation.XmlAccessorType; 027import javax.xml.bind.annotation.XmlElement; 028import javax.xml.bind.annotation.XmlType; 029 030/** 031 * = The Trade Item. 032 * 033 */ 034@XmlAccessorType(XmlAccessType.FIELD) 035@XmlType(name = "SupplyChainTradeLineItemType", propOrder = { "lineDocument", "agreement", "delivery", "settlement", 036 "product" }) 037public class Item { 038 039 @Valid 040 @XmlElement(name = "AssociatedDocumentLineDocument") 041 private Document lineDocument; 042 043 @Valid 044 @XmlElement(name = "SpecifiedSupplyChainTradeAgreement") 045 private SpecifiedAgreement agreement; 046 047 @Valid 048 @XmlElement(name = "SpecifiedSupplyChainTradeDelivery") 049 private SpecifiedDelivery delivery; 050 051 @Valid 052 @XmlElement(name = "SpecifiedSupplyChainTradeSettlement") 053 private SpecifiedSettlement settlement; 054 055 @Valid 056 @XmlElement(name = "SpecifiedTradeProduct") 057 private Product product; 058 059 /** 060 * Gets the item position document. 061 * 062 * @return the position 063 */ 064 public Document getLineDocument() { 065 return lineDocument; 066 } 067 068 /** 069 * Sets the new item line document. 070 * 071 * @param newLineDocument the new position 072 * @return the item 073 */ 074 public Item setLineDocument(Document newLineDocument) { 075 this.lineDocument = newLineDocument; 076 return this; 077 } 078 079 /** 080 * Gets the specified supply chain trade agreement. 081 * 082 * @return the specified supply chain trade agreement 083 */ 084 public SpecifiedAgreement getAgreement() { 085 return agreement; 086 } 087 088 /** 089 * Sets the specified supply chain trade agreement. 090 * 091 * @param agreement the new specified supply chain trade agreement 092 * @return the item 093 */ 094 public Item setAgreement(SpecifiedAgreement agreement) { 095 this.agreement = agreement; 096 return this; 097 } 098 099 /** 100 * Gets the specified supply chain trade delivery. 101 * 102 * @return the specified supply chain trade delivery 103 */ 104 public SpecifiedDelivery getDelivery() { 105 return delivery; 106 } 107 108 /** 109 * Sets the specified supply chain trade delivery. 110 * 111 * @param delivery the new specified supply chain trade delivery 112 * @return the item 113 */ 114 public Item setDelivery(SpecifiedDelivery delivery) { 115 this.delivery = delivery; 116 return this; 117 } 118 119 /** 120 * Gets the specified supply chain trade settlement. 121 * 122 * @return the specified supply chain trade settlement 123 */ 124 public SpecifiedSettlement getSettlement() { 125 return settlement; 126 } 127 128 /** 129 * Sets the specified supply chain trade settlement. 130 * 131 * @param settlement the new specified supply chain trade settlement 132 * @return the item 133 */ 134 public Item setSettlement(SpecifiedSettlement settlement) { 135 this.settlement = settlement; 136 return this; 137 } 138 139 /** 140 * Gets the specified trade product. 141 * 142 * @return the specified trade product 143 */ 144 public Product getProduct() { 145 return product; 146 } 147 148 /** 149 * Sets the specified trade product. 150 * 151 * @param product the product 152 * @return the item 153 */ 154 public Item setProduct(Product product) { 155 this.product = product; 156 return this; 157 } 158}