01: /**
02: * Licensed to the Apache Software Foundation (ASF) under one or more
03: * contributor license agreements. See the NOTICE file distributed with
04: * this work for additional information regarding copyright ownership.
05: * The ASF licenses this file to You under the Apache License, Version 2.0
06: * (the "License"); you may not use this file except in compliance with
07: * the License. You may obtain a copy of the License at
08: *
09: * http://www.apache.org/licenses/LICENSE-2.0
10: *
11: * Unless required by applicable law or agreed to in writing, software
12: * distributed under the License is distributed on an "AS IS" BASIS,
13: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14: * See the License for the specific language governing permissions and
15: * limitations under the License.
16: */package org.apache.openejb.jee.jpa;
17:
18: import javax.xml.bind.annotation.XmlAccessType;
19: import javax.xml.bind.annotation.XmlAccessorType;
20: import javax.xml.bind.annotation.XmlAttribute;
21: import javax.xml.bind.annotation.XmlType;
22:
23: /**
24: *
25: *
26: * @Target({METHOD, FIELD}) @Retention(RUNTIME)
27: * public @interface Transient {}
28: *
29: *
30: *
31: * <p>Java class for transient complex type.
32: *
33: * <p>The following schema fragment specifies the expected content contained within this class.
34: *
35: * <pre>
36: * <complexType name="transient">
37: * <complexContent>
38: * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
39: * <attribute name="name" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
40: * </restriction>
41: * </complexContent>
42: * </complexType>
43: * </pre>
44: *
45: *
46: */
47: @XmlAccessorType(XmlAccessType.FIELD)
48: @XmlType(name="transient")
49: public class Transient implements Field {
50:
51: @XmlAttribute(required=true)
52: protected String name;
53:
54: public Transient() {
55: }
56:
57: public Transient(String name) {
58: this .name = name;
59: }
60:
61: /**
62: * Gets the value of the name property.
63: *
64: * @return
65: * possible object is
66: * {@link String }
67: *
68: */
69: public String getName() {
70: return name;
71: }
72:
73: /**
74: * Sets the value of the name property.
75: *
76: * @param value
77: * allowed object is
78: * {@link String }
79: *
80: */
81: public void setName(String value) {
82: this .name = value;
83: }
84:
85: public Column getColumn() {
86: throw new UnsupportedOperationException(
87: "Transient fields don't have column mappings");
88: }
89:
90: public void setColumn(Column value) {
91: throw new UnsupportedOperationException(
92: "Transient fields don't have column mappings");
93: }
94: }
|