jaxb java_java JAXB 学习

1 //

2 //This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vJAXB 2.1.10 in JDK 63 //See http://java.sun.com/xml/jaxb4 //Any modifications to this file will be lost upon recompilation of the source schema.5 //Generated on: 2014.01.24 at 11:09:15 ���� CST6 //7

8

9 packagemodel;10

11 importjava.util.ArrayList;12 importjava.util.List;13 importjavax.xml.bind.annotation.XmlAccessType;14 importjavax.xml.bind.annotation.XmlAccessorType;15 importjavax.xml.bind.annotation.XmlElement;16 importjavax.xml.bind.annotation.XmlRootElement;17 importjavax.xml.bind.annotation.XmlSchemaType;18 importjavax.xml.bind.annotation.XmlType;19 importjavax.xml.datatype.XMLGregorianCalendar;20

21

22 /**

23 *

Java class for anonymous complex type.24 *25 *

The following schema fragment specifies the expected content contained within this class.26 *27 *

28 * <complexType>29 *   <complexContent>30 *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">31 *       <sequence>32 *         <element name="OrderNo" type="{http://www.w3.org/2001/XMLSchema}string"/>33 *         <element name="OrderDateTime" type="{http://www.w3.org/2001/XMLSchema}dateTime"/>34 *         <element name="CustomerName" type="{http://www.w3.org/2001/XMLSchema}string"/>35 *         <element name="OrderItems">36 *           <complexType>37 *             <complexContent>38 *               <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">39 *                 <sequence>40 *                   <element name="Produdct" maxOccurs="unbounded">41 *                     <complexType>42 *                       <complexContent>43 *                         <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">44 *                           <sequence>45 *                             <element name="ProductNo" type="{http://www.w3.org/2001/XMLSchema}string"/>46 *                             <element name="ProductName" type="{http://www.w3.org/2001/XMLSchema}string"/>47 *                             <element name="Price" type="{http://www.w3.org/2001/XMLSchema}float"/>48 *                             <element name="Amount" type="{http://www.w3.org/2001/XMLSchema}int"/>49 *                           </sequence>50 *                         </restriction>51 *                       </complexContent>52 *                     </complexType>53 *                   </element>54 *                 </sequence>55 *               </restriction>56 *             </complexContent>57 *           </complexType>58 *         </element>59 *       </sequence>60 *     </restriction>61 *   </complexContent>62 * </complexType>63 * 
64 *65 *66 */

67 @XmlAccessorType(XmlAccessType.FIELD)68 @XmlType(name = "", propOrder ={69 "orderNo",70 "orderDateTime",71 "customerName",72 "orderItems"

73 })74 @XmlRootElement(name = "Order")75 public classOrder {76

77 @XmlElement(name = "OrderNo", required = true)78 protectedString orderNo;79 @XmlElement(name = "OrderDateTime", required = true)80 @XmlSchemaType(name = "dateTime")81 protectedXMLGregorianCalendar orderDateTime;82 @XmlElement(name = "CustomerName", required = true)83 protectedString customerName;84 @XmlElement(name = "OrderItems", required = true)85 protectedOrder.OrderItems orderItems;86

87 /**

88 * Gets the value of the orderNo property.89 *90 *@return

91 * possible object is92 * {@linkString }93 *94 */

95 publicString getOrderNo() {96 returnorderNo;97 }98

99 /**

100 * Sets the value of the orderNo property.101 *102 *@paramvalue103 * allowed object is104 * {@linkString }105 *106 */

107 public voidsetOrderNo(String value) {108 this.orderNo =value;109 }110

111 /**

112 * Gets the value of the orderDateTime property.113 *114 *@return

115 * possible object is116 * {@linkXMLGregorianCalendar }117 *118 */

119 publicXMLGregorianCalendar getOrderDateTime() {120 returnorderDateTime;121 }122

123 /**

124 * Sets the value of the orderDateTime property.125 *126 *@paramvalue127 * allowed object is128 * {@linkXMLGregorianCalendar }129 *130 */

131 public voidsetOrderDateTime(XMLGregorianCalendar value) {132 this.orderDateTime =value;133 }134

135 /**

136 * Gets the value of the customerName property.137 *138 *@return

139 * possible object is140 * {@linkString }141 *142 */

143 publicString getCustomerName() {144 returncustomerName;145 }146

147 /**

148 * Sets the value of the customerName property.149 *150 *@paramvalue151 * allowed object is152 * {@linkString }153 *154 */

155 public voidsetCustomerName(String value) {156 this.customerName =value;157 }158

159 /**

160 * Gets the value of the orderItems property.161 *162 *@return

163 * possible object is164 * {@linkOrder.OrderItems }165 *166 */

167 publicOrder.OrderItems getOrderItems() {168 returnorderItems;169 }170

171 /**

172 * Sets the value of the orderItems property.173 *174 *@paramvalue175 * allowed object is176 * {@linkOrder.OrderItems }177 *178 */

179 public voidsetOrderItems(Order.OrderItems value) {180 this.orderItems =value;181 }182

183

184 /**

185 *

Java class for anonymous complex type.186 *187 *

The following schema fragment specifies the expected content contained within this class.188 *189 *

190 * <complexType>191 *   <complexContent>192 *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">193 *       <sequence>194 *         <element name="Produdct" maxOccurs="unbounded">195 *           <complexType>196 *             <complexContent>197 *               <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">198 *                 <sequence>199 *                   <element name="ProductNo" type="{http://www.w3.org/2001/XMLSchema}string"/>200 *                   <element name="ProductName" type="{http://www.w3.org/2001/XMLSchema}string"/>201 *                   <element name="Price" type="{http://www.w3.org/2001/XMLSchema}float"/>202 *                   <element name="Amount" type="{http://www.w3.org/2001/XMLSchema}int"/>203 *                 </sequence>204 *               </restriction>205 *             </complexContent>206 *           </complexType>207 *         </element>208 *       </sequence>209 *     </restriction>210 *   </complexContent>211 * </complexType>212 * 
213 *214 *215 */

216 @XmlAccessorType(XmlAccessType.FIELD)217 @XmlType(name = "", propOrder ={218 "produdct"

219 })220 public static classOrderItems {221

222 @XmlElement(name = "Produdct", required = true)223 protected Listprodudct;224

225 /**

226 * Gets the value of the produdct property.227 *228 *

229 * This accessor method returns a reference to the live list,230 * not a snapshot. Therefore any modification you make to the231 * returned list will be present inside the JAXB object.232 * This is why there is not a set method for the produdct property.233 *234 *

235 * For example, to add a new item, do as follows:236 *

237 *    getProdudct().add(newItem);238 * 
239 *240 *241 *

242 * Objects of the following type(s) are allowed in the list243 * {@linkOrder.OrderItems.Produdct }244 *245 *246 */

247 public ListgetProdudct() {248 if (produdct == null) {249 produdct = new ArrayList();250 }251 return this.produdct;252 }253

254

255 /**

256 *

Java class for anonymous complex type.257 *258 *

The following schema fragment specifies the expected content contained within this class.259 *260 *

261 * <complexType>262 *   <complexContent>263 *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">264 *       <sequence>265 *         <element name="ProductNo" type="{http://www.w3.org/2001/XMLSchema}string"/>266 *         <element name="ProductName" type="{http://www.w3.org/2001/XMLSchema}string"/>267 *         <element name="Price" type="{http://www.w3.org/2001/XMLSchema}float"/>268 *         <element name="Amount" type="{http://www.w3.org/2001/XMLSchema}int"/>269 *       </sequence>270 *     </restriction>271 *   </complexContent>272 * </complexType>273 * 
274 *275 *276 */

277 @XmlAccessorType(XmlAccessType.FIELD)278 @XmlType(name = "", propOrder ={279 "productNo",280 "productName",281 "price",282 "amount"

283 })284 public static classProdudct {285

286 @XmlElement(name = "ProductNo", required = true)287 protectedString productNo;288 @XmlElement(name = "ProductName", required = true)289 protectedString productName;290 @XmlElement(name = "Price")291 protected floatprice;292 @XmlElement(name = "Amount")293 protected intamount;294

295 /**

296 * Gets the value of the productNo property.297 *298 *@return

299 * possible object is300 * {@linkString }301 *302 */

303 publicString getProductNo() {304 returnproductNo;305 }306

307 /**

308 * Sets the value of the productNo property.309 *310 *@paramvalue311 * allowed object is312 * {@linkString }313 *314 */

315 public voidsetProductNo(String value) {316 this.productNo =value;317 }318

319 /**

320 * Gets the value of the productName property.321 *322 *@return

323 * possible object is324 * {@linkString }325 *326 */

327 publicString getProductName() {328 returnproductName;329 }330

331 /**

332 * Sets the value of the productName property.333 *334 *@paramvalue335 * allowed object is336 * {@linkString }337 *338 */

339 public voidsetProductName(String value) {340 this.productName =value;341 }342

343 /**

344 * Gets the value of the price property.345 *346 */

347 public floatgetPrice() {348 returnprice;349 }350

351 /**

352 * Sets the value of the price property.353 *354 */

355 public void setPrice(floatvalue) {356 this.price =value;357 }358

359 /**

360 * Gets the value of the amount property.361 *362 */

363 public intgetAmount() {364 returnamount;365 }366

367 /**

368 * Sets the value of the amount property.369 *370 */

371 public void setAmount(intvalue) {372 this.amount =value;373 }374

375 }376

377 }378

379 }

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值