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: * @Target({METHOD, FIELD}) @Retention(RUNTIME)
027: * public @interface JoinColumn {
028: * String name() default "";
029: * String referencedColumnName() default "";
030: * boolean unique() default false;
031: * boolean nullable() default true;
032: * boolean insertable() default true;
033: * boolean updatable() default true;
034: * String columnDefinition() default "";
035: * String table() default "";
036: * }
037: *
038: *
039: *
040: * <p>Java class for join-column complex type.
041: *
042: * <p>The following schema fragment specifies the expected content contained within this class.
043: *
044: * <pre>
045: * <complexType name="join-column">
046: * <complexContent>
047: * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
048: * <attribute name="column-definition" type="{http://www.w3.org/2001/XMLSchema}string" />
049: * <attribute name="insertable" type="{http://www.w3.org/2001/XMLSchema}boolean" />
050: * <attribute name="name" type="{http://www.w3.org/2001/XMLSchema}string" />
051: * <attribute name="nullable" type="{http://www.w3.org/2001/XMLSchema}boolean" />
052: * <attribute name="referenced-column-name" type="{http://www.w3.org/2001/XMLSchema}string" />
053: * <attribute name="table" type="{http://www.w3.org/2001/XMLSchema}string" />
054: * <attribute name="unique" type="{http://www.w3.org/2001/XMLSchema}boolean" />
055: * <attribute name="updatable" type="{http://www.w3.org/2001/XMLSchema}boolean" />
056: * </restriction>
057: * </complexContent>
058: * </complexType>
059: * </pre>
060: *
061: *
062: */
063: @XmlAccessorType(XmlAccessType.FIELD)
064: @XmlType(name="join-column")
065: public class JoinColumn {
066:
067: @XmlAttribute(name="column-definition")
068: protected String columnDefinition;
069: @XmlAttribute
070: protected Boolean insertable;
071: @XmlAttribute
072: protected String name;
073: @XmlAttribute
074: protected Boolean nullable;
075: @XmlAttribute(name="referenced-column-name")
076: protected String referencedColumnName;
077: @XmlAttribute
078: protected String table;
079: @XmlAttribute
080: protected Boolean unique;
081: @XmlAttribute
082: protected Boolean updatable;
083:
084: /**
085: * Gets the value of the columnDefinition property.
086: *
087: * @return
088: * possible object is
089: * {@link String }
090: *
091: */
092: public String getColumnDefinition() {
093: return columnDefinition;
094: }
095:
096: /**
097: * Sets the value of the columnDefinition property.
098: *
099: * @param value
100: * allowed object is
101: * {@link String }
102: *
103: */
104: public void setColumnDefinition(String value) {
105: this .columnDefinition = value;
106: }
107:
108: /**
109: * Gets the value of the insertable property.
110: *
111: * @return
112: * possible object is
113: * {@link Boolean }
114: *
115: */
116: public Boolean isInsertable() {
117: return insertable;
118: }
119:
120: /**
121: * Sets the value of the insertable property.
122: *
123: * @param value
124: * allowed object is
125: * {@link Boolean }
126: *
127: */
128: public void setInsertable(Boolean value) {
129: this .insertable = value;
130: }
131:
132: /**
133: * Gets the value of the name property.
134: *
135: * @return
136: * possible object is
137: * {@link String }
138: *
139: */
140: public String getName() {
141: return name;
142: }
143:
144: /**
145: * Sets the value of the name property.
146: *
147: * @param value
148: * allowed object is
149: * {@link String }
150: *
151: */
152: public void setName(String value) {
153: this .name = value;
154: }
155:
156: /**
157: * Gets the value of the nullable property.
158: *
159: * @return
160: * possible object is
161: * {@link Boolean }
162: *
163: */
164: public Boolean isNullable() {
165: return nullable;
166: }
167:
168: /**
169: * Sets the value of the nullable property.
170: *
171: * @param value
172: * allowed object is
173: * {@link Boolean }
174: *
175: */
176: public void setNullable(Boolean value) {
177: this .nullable = value;
178: }
179:
180: /**
181: * Gets the value of the referencedColumnName property.
182: *
183: * @return
184: * possible object is
185: * {@link String }
186: *
187: */
188: public String getReferencedColumnName() {
189: return referencedColumnName;
190: }
191:
192: /**
193: * Sets the value of the referencedColumnName property.
194: *
195: * @param value
196: * allowed object is
197: * {@link String }
198: *
199: */
200: public void setReferencedColumnName(String value) {
201: this .referencedColumnName = value;
202: }
203:
204: /**
205: * Gets the value of the table property.
206: *
207: * @return
208: * possible object is
209: * {@link String }
210: *
211: */
212: public String getTable() {
213: return table;
214: }
215:
216: /**
217: * Sets the value of the table property.
218: *
219: * @param value
220: * allowed object is
221: * {@link String }
222: *
223: */
224: public void setTable(String value) {
225: this .table = value;
226: }
227:
228: /**
229: * Gets the value of the unique property.
230: *
231: * @return
232: * possible object is
233: * {@link Boolean }
234: *
235: */
236: public Boolean isUnique() {
237: return unique;
238: }
239:
240: /**
241: * Sets the value of the unique property.
242: *
243: * @param value
244: * allowed object is
245: * {@link Boolean }
246: *
247: */
248: public void setUnique(Boolean value) {
249: this .unique = value;
250: }
251:
252: /**
253: * Gets the value of the updatable property.
254: *
255: * @return
256: * possible object is
257: * {@link Boolean }
258: *
259: */
260: public Boolean isUpdatable() {
261: return updatable;
262: }
263:
264: /**
265: * Sets the value of the updatable property.
266: *
267: * @param value
268: * allowed object is
269: * {@link Boolean }
270: *
271: */
272: public void setUpdatable(Boolean value) {
273: this.updatable = value;
274: }
275:
276: }
|