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