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 javax.xml.bind.annotation.XmlAccessType;
019: import javax.xml.bind.annotation.XmlAccessorType;
020: import javax.xml.bind.annotation.XmlAttribute;
021: import javax.xml.bind.annotation.XmlType;
022:
023: /**
024: *
025: *
026: * Defines the settings and mappings for embeddable objects. Is
027: * allowed to be sparsely populated and used in conjunction with
028: * the annotations. Alternatively, the metadata-complete attribute
029: * can be used to indicate that no annotations are to be processed
030: * in the class. If this is the case then the defaulting rules will
031: * be recursively applied.
032: *
033: * @Target({TYPE}) @Retention(RUNTIME)
034: * public @interface Embeddable {}
035: *
036: *
037: *
038: * <p>Java class for embeddable complex type.
039: *
040: * <p>The following schema fragment specifies the expected content contained within this class.
041: *
042: * <pre>
043: * <complexType name="embeddable">
044: * <complexContent>
045: * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
046: * <sequence>
047: * <element name="description" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
048: * <element name="attributes" type="{http://java.sun.com/xml/ns/persistence/orm}embeddable-attributes" minOccurs="0"/>
049: * </sequence>
050: * <attribute name="access" type="{http://java.sun.com/xml/ns/persistence/orm}access-type" />
051: * <attribute name="class" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
052: * <attribute name="metadata-complete" type="{http://www.w3.org/2001/XMLSchema}boolean" />
053: * </restriction>
054: * </complexContent>
055: * </complexType>
056: * </pre>
057: *
058: *
059: */
060: @XmlAccessorType(XmlAccessType.FIELD)
061: @XmlType(name="embeddable",propOrder={"description","attributes"})
062: public class Embeddable {
063:
064: protected String description;
065: protected EmbeddableAttributes attributes;
066: @XmlAttribute
067: protected AccessType access;
068: @XmlAttribute(name="class",required=true)
069: protected String clazz;
070: @XmlAttribute(name="metadata-complete")
071: protected Boolean metadataComplete;
072:
073: /**
074: * Gets the value of the description property.
075: *
076: * @return
077: * possible object is
078: * {@link String }
079: *
080: */
081: public String getDescription() {
082: return description;
083: }
084:
085: /**
086: * Sets the value of the description property.
087: *
088: * @param value
089: * allowed object is
090: * {@link String }
091: *
092: */
093: public void setDescription(String value) {
094: this .description = value;
095: }
096:
097: /**
098: * Gets the value of the attributes property.
099: *
100: * @return
101: * possible object is
102: * {@link EmbeddableAttributes }
103: *
104: */
105: public EmbeddableAttributes getAttributes() {
106: return attributes;
107: }
108:
109: /**
110: * Sets the value of the attributes property.
111: *
112: * @param value
113: * allowed object is
114: * {@link EmbeddableAttributes }
115: *
116: */
117: public void setAttributes(EmbeddableAttributes value) {
118: this .attributes = value;
119: }
120:
121: /**
122: * Gets the value of the access property.
123: *
124: * @return
125: * possible object is
126: * {@link AccessType }
127: *
128: */
129: public AccessType getAccess() {
130: return access;
131: }
132:
133: /**
134: * Sets the value of the access property.
135: *
136: * @param value
137: * allowed object is
138: * {@link AccessType }
139: *
140: */
141: public void setAccess(AccessType value) {
142: this .access = value;
143: }
144:
145: /**
146: * Gets the value of the clazz property.
147: *
148: * @return
149: * possible object is
150: * {@link String }
151: *
152: */
153: public String getClazz() {
154: return clazz;
155: }
156:
157: /**
158: * Sets the value of the clazz property.
159: *
160: * @param value
161: * allowed object is
162: * {@link String }
163: *
164: */
165: public void setClazz(String value) {
166: this .clazz = value;
167: }
168:
169: /**
170: * Gets the value of the metadataComplete property.
171: *
172: * @return
173: * possible object is
174: * {@link Boolean }
175: *
176: */
177: public Boolean isMetadataComplete() {
178: return metadataComplete;
179: }
180:
181: /**
182: * Sets the value of the metadataComplete property.
183: *
184: * @param value
185: * allowed object is
186: * {@link Boolean }
187: *
188: */
189: public void setMetadataComplete(Boolean value) {
190: this.metadataComplete = value;
191: }
192:
193: }
|