001: /**
002: * Licensed to the Apache Software Foundation (ASF) under one or more
003: * contributor license agreements. See the NOTICE file distributed with
004: * this work for additional information regarding copyright ownership.
005: * The ASF licenses this file to You under the Apache License, Version 2.0
006: * (the "License"); you may not use this file except in compliance with
007: * the License. You may obtain a copy of the License at
008: *
009: * http://www.apache.org/licenses/LICENSE-2.0
010: *
011: * Unless required by applicable law or agreed to in writing, software
012: * distributed under the License is distributed on an "AS IS" BASIS,
013: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
014: * See the License for the specific language governing permissions and
015: * limitations under the License.
016: */package org.apache.openejb.jee.jpa;
017:
018: import java.util.ArrayList;
019: import java.util.List;
020: import javax.xml.bind.annotation.XmlAccessType;
021: import javax.xml.bind.annotation.XmlAccessorType;
022: import javax.xml.bind.annotation.XmlAttribute;
023: import javax.xml.bind.annotation.XmlElement;
024: import javax.xml.bind.annotation.XmlType;
025:
026: /**
027: *
028: *
029: * @Target({METHOD, FIELD}) @Retention(RUNTIME)
030: * public @interface Embedded {}
031: *
032: *
033: *
034: * <p>Java class for embedded complex type.
035: *
036: * <p>The following schema fragment specifies the expected content contained within this class.
037: *
038: * <pre>
039: * <complexType name="embedded">
040: * <complexContent>
041: * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
042: * <sequence>
043: * <element name="attribute-override" type="{http://java.sun.com/xml/ns/persistence/orm}attribute-override" maxOccurs="unbounded" minOccurs="0"/>
044: * </sequence>
045: * <attribute name="name" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
046: * </restriction>
047: * </complexContent>
048: * </complexType>
049: * </pre>
050: *
051: *
052: */
053: @XmlAccessorType(XmlAccessType.FIELD)
054: @XmlType(name="embedded",propOrder={"attributeOverride"})
055: public class Embedded {
056:
057: @XmlElement(name="attribute-override")
058: protected List<AttributeOverride> attributeOverride;
059: @XmlAttribute(required=true)
060: protected String name;
061:
062: /**
063: * Gets the value of the attributeOverride property.
064: *
065: * <p>
066: * This accessor method returns a reference to the live list,
067: * not a snapshot. Therefore any modification you make to the
068: * returned list will be present inside the JAXB object.
069: * This is why there is not a <CODE>set</CODE> method for the attributeOverride property.
070: *
071: * <p>
072: * For example, to add a new item, do as follows:
073: * <pre>
074: * getAttributeOverride().add(newItem);
075: * </pre>
076: *
077: *
078: * <p>
079: * Objects of the following type(s) are allowed in the list
080: * {@link AttributeOverride }
081: *
082: *
083: */
084: public List<AttributeOverride> getAttributeOverride() {
085: if (attributeOverride == null) {
086: attributeOverride = new ArrayList<AttributeOverride>();
087: }
088: return this .attributeOverride;
089: }
090:
091: /**
092: * Gets the value of the name property.
093: *
094: * @return
095: * possible object is
096: * {@link String }
097: *
098: */
099: public String getName() {
100: return name;
101: }
102:
103: /**
104: * Sets the value of the name property.
105: *
106: * @param value
107: * allowed object is
108: * {@link String }
109: *
110: */
111: public void setName(String value) {
112: this.name = value;
113: }
114:
115: }
|