1 /** 2 * 3 * Licensed to the Apache Software Foundation (ASF) under one or more 4 * contributor license agreements. See the NOTICE file distributed with 5 * this work for additional information regarding copyright ownership. 6 * The ASF licenses this file to You under the Apache License, Version 2.0 7 * (the "License"); you may not use this file except in compliance with 8 * the License. You may obtain a copy of the License at 9 * 10 * http://www.apache.org/licenses/LICENSE-2.0 11 * 12 * Unless required by applicable law or agreed to in writing, software 13 * distributed under the License is distributed on an "AS IS" BASIS, 14 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 * See the License for the specific language governing permissions and 16 * limitations under the License. 17 */ 18 package org.apache.openejb.jee.jpa.unit; 19 20 import javax.xml.bind.annotation.XmlAccessorType; 21 import javax.xml.bind.annotation.XmlAccessType; 22 import javax.xml.bind.annotation.XmlType; 23 import javax.xml.bind.annotation.XmlElement; 24 import java.util.List; 25 import java.util.ArrayList; 26 27 /** 28 * <p>Java class for anonymous complex type. 29 * 30 * <p>The following schema fragment specifies the expected content contained within this class. 31 * 32 * <pre> 33 * <complexType> 34 * <complexContent> 35 * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType"> 36 * <sequence> 37 * <element name="property" maxOccurs="unbounded" minOccurs="0"> 38 * <complexType> 39 * <complexContent> 40 * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType"> 41 * <attribute name="name" use="required" type="{http://www.w3.org/2001/XMLSchema}string" /> 42 * <attribute name="value" use="required" type="{http://www.w3.org/2001/XMLSchema}string" /> 43 * </restriction> 44 * </complexContent> 45 * </complexType> 46 * </element> 47 * </sequence> 48 * </restriction> 49 * </complexContent> 50 * </complexType> 51 * </pre> 52 * 53 * 54 */ 55 @XmlAccessorType(XmlAccessType.FIELD) 56 @XmlType(name = "", propOrder = { 57 "property" 58 }) 59 public class Properties { 60 61 @XmlElement(required = true) 62 protected List<Property> property; 63 64 /** 65 * Gets the value of the property property. 66 * 67 * <p> 68 * This accessor method returns a reference to the live list, 69 * not a snapshot. Therefore any modification you make to the 70 * returned list will be present inside the JAXB object. 71 * This is why there is not a <CODE>set</CODE> method for the property property. 72 * 73 * <p> 74 * For example, to add a new item, do as follows: 75 * <pre> 76 * getProperty().add(newItem); 77 * </pre> 78 * 79 * 80 * <p> 81 * Objects of the following type(s) are allowed in the list 82 * {@link Property } 83 * 84 * 85 */ 86 public List<Property> getProperty() { 87 if (property == null) { 88 property = new ArrayList<Property>(); 89 } 90 return this.property; 91 } 92 93 public void setProperty(String name, String value){ 94 getProperty().add(new Property(name, value)); 95 } 96 97 }