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({}) @Retention(RUNTIME)
030: * public @interface EntityResult {
031: * Class entityClass();
032: * FieldResult[] fields() default {};
033: * String discriminatorColumn() default "";
034: * }
035: *
036: *
037: *
038: * <p>Java class for entity-result complex type.
039: *
040: * <p>The following schema fragment specifies the expected content contained within this class.
041: *
042: * <pre>
043: * <complexType name="entity-result">
044: * <complexContent>
045: * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
046: * <sequence>
047: * <element name="field-result" type="{http://java.sun.com/xml/ns/persistence/orm}field-result" maxOccurs="unbounded" minOccurs="0"/>
048: * </sequence>
049: * <attribute name="discriminator-column" type="{http://www.w3.org/2001/XMLSchema}string" />
050: * <attribute name="entity-class" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
051: * </restriction>
052: * </complexContent>
053: * </complexType>
054: * </pre>
055: *
056: *
057: */
058: @XmlAccessorType(XmlAccessType.FIELD)
059: @XmlType(name="entity-result",propOrder={"fieldResult"})
060: public class EntityResult {
061:
062: @XmlElement(name="field-result")
063: protected List<FieldResult> fieldResult;
064: @XmlAttribute(name="discriminator-column")
065: protected String discriminatorColumn;
066: @XmlAttribute(name="entity-class",required=true)
067: protected String entityClass;
068:
069: /**
070: * Gets the value of the fieldResult property.
071: *
072: * <p>
073: * This accessor method returns a reference to the live list,
074: * not a snapshot. Therefore any modification you make to the
075: * returned list will be present inside the JAXB object.
076: * This is why there is not a <CODE>set</CODE> method for the fieldResult property.
077: *
078: * <p>
079: * For example, to add a new item, do as follows:
080: * <pre>
081: * getFieldResult().add(newItem);
082: * </pre>
083: *
084: *
085: * <p>
086: * Objects of the following type(s) are allowed in the list
087: * {@link FieldResult }
088: *
089: *
090: */
091: public List<FieldResult> getFieldResult() {
092: if (fieldResult == null) {
093: fieldResult = new ArrayList<FieldResult>();
094: }
095: return this .fieldResult;
096: }
097:
098: /**
099: * Gets the value of the discriminatorColumn property.
100: *
101: * @return
102: * possible object is
103: * {@link String }
104: *
105: */
106: public String getDiscriminatorColumn() {
107: return discriminatorColumn;
108: }
109:
110: /**
111: * Sets the value of the discriminatorColumn property.
112: *
113: * @param value
114: * allowed object is
115: * {@link String }
116: *
117: */
118: public void setDiscriminatorColumn(String value) {
119: this .discriminatorColumn = value;
120: }
121:
122: /**
123: * Gets the value of the entityClass property.
124: *
125: * @return
126: * possible object is
127: * {@link String }
128: *
129: */
130: public String getEntityClass() {
131: return entityClass;
132: }
133:
134: /**
135: * Sets the value of the entityClass property.
136: *
137: * @param value
138: * allowed object is
139: * {@link String }
140: *
141: */
142: public void setEntityClass(String value) {
143: this.entityClass = value;
144: }
145:
146: }
|