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.XmlElement;
022: import javax.xml.bind.annotation.XmlType;
023:
024: /**
025: *
026: *
027: * Defines an entity listener to be invoked at lifecycle events
028: * for the entities that list this listener.
029: *
030: *
031: *
032: * <p>Java class for entity-listener complex type.
033: *
034: * <p>The following schema fragment specifies the expected content contained within this class.
035: *
036: * <pre>
037: * <complexType name="entity-listener">
038: * <complexContent>
039: * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
040: * <sequence>
041: * <element name="pre-persist" type="{http://java.sun.com/xml/ns/persistence/orm}pre-persist" minOccurs="0"/>
042: * <element name="post-persist" type="{http://java.sun.com/xml/ns/persistence/orm}post-persist" minOccurs="0"/>
043: * <element name="pre-remove" type="{http://java.sun.com/xml/ns/persistence/orm}pre-remove" minOccurs="0"/>
044: * <element name="post-remove" type="{http://java.sun.com/xml/ns/persistence/orm}post-remove" minOccurs="0"/>
045: * <element name="pre-update" type="{http://java.sun.com/xml/ns/persistence/orm}pre-update" minOccurs="0"/>
046: * <element name="post-update" type="{http://java.sun.com/xml/ns/persistence/orm}post-update" minOccurs="0"/>
047: * <element name="post-load" type="{http://java.sun.com/xml/ns/persistence/orm}post-load" minOccurs="0"/>
048: * </sequence>
049: * <attribute name="class" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
050: * </restriction>
051: * </complexContent>
052: * </complexType>
053: * </pre>
054: *
055: *
056: */
057: @XmlAccessorType(XmlAccessType.FIELD)
058: @XmlType(name="entity-listener",propOrder={"prePersist","postPersist","preRemove","postRemove","preUpdate","postUpdate","postLoad"})
059: public class EntityListener {
060:
061: @XmlElement(name="pre-persist")
062: protected PrePersist prePersist;
063: @XmlElement(name="post-persist")
064: protected PostPersist postPersist;
065: @XmlElement(name="pre-remove")
066: protected PreRemove preRemove;
067: @XmlElement(name="post-remove")
068: protected PostRemove postRemove;
069: @XmlElement(name="pre-update")
070: protected PreUpdate preUpdate;
071: @XmlElement(name="post-update")
072: protected PostUpdate postUpdate;
073: @XmlElement(name="post-load")
074: protected PostLoad postLoad;
075: @XmlAttribute(name="class",required=true)
076: protected String clazz;
077:
078: /**
079: * Gets the value of the prePersist property.
080: *
081: * @return
082: * possible object is
083: * {@link PrePersist }
084: *
085: */
086: public PrePersist getPrePersist() {
087: return prePersist;
088: }
089:
090: /**
091: * Sets the value of the prePersist property.
092: *
093: * @param value
094: * allowed object is
095: * {@link PrePersist }
096: *
097: */
098: public void setPrePersist(PrePersist value) {
099: this .prePersist = value;
100: }
101:
102: /**
103: * Gets the value of the postPersist property.
104: *
105: * @return
106: * possible object is
107: * {@link PostPersist }
108: *
109: */
110: public PostPersist getPostPersist() {
111: return postPersist;
112: }
113:
114: /**
115: * Sets the value of the postPersist property.
116: *
117: * @param value
118: * allowed object is
119: * {@link PostPersist }
120: *
121: */
122: public void setPostPersist(PostPersist value) {
123: this .postPersist = value;
124: }
125:
126: /**
127: * Gets the value of the preRemove property.
128: *
129: * @return
130: * possible object is
131: * {@link PreRemove }
132: *
133: */
134: public PreRemove getPreRemove() {
135: return preRemove;
136: }
137:
138: /**
139: * Sets the value of the preRemove property.
140: *
141: * @param value
142: * allowed object is
143: * {@link PreRemove }
144: *
145: */
146: public void setPreRemove(PreRemove value) {
147: this .preRemove = value;
148: }
149:
150: /**
151: * Gets the value of the postRemove property.
152: *
153: * @return
154: * possible object is
155: * {@link PostRemove }
156: *
157: */
158: public PostRemove getPostRemove() {
159: return postRemove;
160: }
161:
162: /**
163: * Sets the value of the postRemove property.
164: *
165: * @param value
166: * allowed object is
167: * {@link PostRemove }
168: *
169: */
170: public void setPostRemove(PostRemove value) {
171: this .postRemove = value;
172: }
173:
174: /**
175: * Gets the value of the preUpdate property.
176: *
177: * @return
178: * possible object is
179: * {@link PreUpdate }
180: *
181: */
182: public PreUpdate getPreUpdate() {
183: return preUpdate;
184: }
185:
186: /**
187: * Sets the value of the preUpdate property.
188: *
189: * @param value
190: * allowed object is
191: * {@link PreUpdate }
192: *
193: */
194: public void setPreUpdate(PreUpdate value) {
195: this .preUpdate = value;
196: }
197:
198: /**
199: * Gets the value of the postUpdate property.
200: *
201: * @return
202: * possible object is
203: * {@link PostUpdate }
204: *
205: */
206: public PostUpdate getPostUpdate() {
207: return postUpdate;
208: }
209:
210: /**
211: * Sets the value of the postUpdate property.
212: *
213: * @param value
214: * allowed object is
215: * {@link PostUpdate }
216: *
217: */
218: public void setPostUpdate(PostUpdate value) {
219: this .postUpdate = value;
220: }
221:
222: /**
223: * Gets the value of the postLoad property.
224: *
225: * @return
226: * possible object is
227: * {@link PostLoad }
228: *
229: */
230: public PostLoad getPostLoad() {
231: return postLoad;
232: }
233:
234: /**
235: * Sets the value of the postLoad property.
236: *
237: * @param value
238: * allowed object is
239: * {@link PostLoad }
240: *
241: */
242: public void setPostLoad(PostLoad value) {
243: this .postLoad = value;
244: }
245:
246: /**
247: * Gets the value of the clazz property.
248: *
249: * @return
250: * possible object is
251: * {@link String }
252: *
253: */
254: public String getClazz() {
255: return clazz;
256: }
257:
258: /**
259: * Sets the value of the clazz property.
260: *
261: * @param value
262: * allowed object is
263: * {@link String }
264: *
265: */
266: public void setClazz(String value) {
267: this.clazz = value;
268: }
269:
270: }
|