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.XmlElement;
021: import javax.xml.bind.annotation.XmlType;
022:
023: /**
024: *
025: *
026: * public enum CascadeType { ALL, PERSIST, MERGE, REMOVE, REFRESH};
027: *
028: *
029: *
030: * <p>Java class for cascade-type complex type.
031: *
032: * <p>The following schema fragment specifies the expected content contained within this class.
033: *
034: * <pre>
035: * <complexType name="cascade-type">
036: * <complexContent>
037: * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
038: * <sequence>
039: * <element name="cascade-all" type="{http://java.sun.com/xml/ns/persistence/orm}emptyType" minOccurs="0"/>
040: * <element name="cascade-persist" type="{http://java.sun.com/xml/ns/persistence/orm}emptyType" minOccurs="0"/>
041: * <element name="cascade-merge" type="{http://java.sun.com/xml/ns/persistence/orm}emptyType" minOccurs="0"/>
042: * <element name="cascade-remove" type="{http://java.sun.com/xml/ns/persistence/orm}emptyType" minOccurs="0"/>
043: * <element name="cascade-refresh" type="{http://java.sun.com/xml/ns/persistence/orm}emptyType" minOccurs="0"/>
044: * </sequence>
045: * </restriction>
046: * </complexContent>
047: * </complexType>
048: * </pre>
049: *
050: *
051: */
052: @XmlAccessorType(XmlAccessType.FIELD)
053: @XmlType(name="cascade-type",propOrder={"cascadeAll","cascadePersist","cascadeMerge","cascadeRemove","cascadeRefresh"})
054: public class CascadeType {
055:
056: @XmlElement(name="cascade-all")
057: protected EmptyType cascadeAll;
058: @XmlElement(name="cascade-persist")
059: protected EmptyType cascadePersist;
060: @XmlElement(name="cascade-merge")
061: protected EmptyType cascadeMerge;
062: @XmlElement(name="cascade-remove")
063: protected EmptyType cascadeRemove;
064: @XmlElement(name="cascade-refresh")
065: protected EmptyType cascadeRefresh;
066:
067: /**
068: * Gets the value of the cascadeAll property.
069: *
070: * @return
071: * possible object is
072: * {@link boolean }
073: *
074: */
075: public boolean isCascadeAll() {
076: return cascadeAll != null;
077: }
078:
079: /**
080: * Sets the value of the cascadeAll property.
081: *
082: * @param value
083: * allowed object is
084: * {@link boolean }
085: *
086: */
087: public void setCascadeAll(boolean value) {
088: this .cascadeAll = value ? new EmptyType() : null;
089: }
090:
091: /**
092: * Gets the value of the cascadePersist property.
093: *
094: * @return
095: * possible object is
096: * {@link boolean }
097: *
098: */
099: public boolean isCascadePersist() {
100: return cascadePersist != null;
101: }
102:
103: /**
104: * Sets the value of the cascadePersist property.
105: *
106: * @param value
107: * allowed object is
108: * {@link boolean }
109: *
110: */
111: public void setCascadePersist(boolean value) {
112: this .cascadePersist = value ? new EmptyType() : null;
113: }
114:
115: /**
116: * Gets the value of the cascadeMerge property.
117: *
118: * @return
119: * possible object is
120: * {@link boolean }
121: *
122: */
123: public boolean isCascadeMerge() {
124: return cascadeMerge != null;
125: }
126:
127: /**
128: * Sets the value of the cascadeMerge property.
129: *
130: * @param value
131: * allowed object is
132: * {@link boolean }
133: *
134: */
135: public void setCascadeMerge(boolean value) {
136: this .cascadeMerge = value ? new EmptyType() : null;
137: }
138:
139: /**
140: * Gets the value of the cascadeRemove property.
141: *
142: * @return
143: * possible object is
144: * {@link boolean }
145: *
146: */
147: public boolean isCascadeRemove() {
148: return cascadeRemove != null;
149: }
150:
151: /**
152: * Sets the value of the cascadeRemove property.
153: *
154: * @param value
155: * allowed object is
156: * {@link boolean }
157: *
158: */
159: public void setCascadeRemove(boolean value) {
160: this .cascadeRemove = value ? new EmptyType() : null;
161: }
162:
163: /**
164: * Gets the value of the cascadeRefresh property.
165: *
166: * @return
167: * possible object is
168: * {@link boolean }
169: *
170: */
171: public boolean isCascadeRefresh() {
172: return cascadeRefresh != null;
173: }
174:
175: /**
176: * Sets the value of the cascadeRefresh property.
177: *
178: * @param value
179: * allowed object is
180: * {@link boolean }
181: *
182: */
183: public void setCascadeRefresh(boolean value) {
184: this .cascadeRefresh = value ? new EmptyType() : null;
185: }
186:
187: }
|