KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > cayenne > jpa > map > JpaAbstractEntity


1 /*****************************************************************
2  * Licensed to the Apache Software Foundation (ASF) under one
3  * or more contributor license agreements. See the NOTICE file
4  * distributed with this work for additional information
5  * regarding copyright ownership. The ASF licenses this file
6  * to you under the Apache License, Version 2.0 (the
7  * "License"); you may not use this file except in compliance
8  * with the License. You may obtain a copy of the License at
9  *
10  * http://www.apache.org/licenses/LICENSE-2.0
11  *
12  * Unless required by applicable law or agreed to in writing,
13  * software distributed under the License is distributed on an
14  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15  * KIND, either express or implied. See the License for the
16  * specific language governing permissions and limitations
17  * under the License.
18  ****************************************************************/

19
20 package org.apache.cayenne.jpa.map;
21
22 import org.apache.cayenne.util.TreeNodeChild;
23
24 public abstract class JpaAbstractEntity extends JpaManagedClass {
25
26     protected JpaIdClass idClass;
27     protected boolean excludeDefaultListeners;
28     protected boolean excludeSuperclassListeners;
29     protected JpaEntityListeners entityListeners;
30     protected JpaLifecycleCallback prePersist;
31     protected JpaLifecycleCallback postPersist;
32     protected JpaLifecycleCallback preRemove;
33     protected JpaLifecycleCallback postRemove;
34     protected JpaLifecycleCallback preUpdate;
35     protected JpaLifecycleCallback postUpdate;
36     protected JpaLifecycleCallback postLoad;
37
38     @TreeNodeChild
39     public JpaEntityListeners getEntityListeners() {
40         return entityListeners;
41     }
42
43     public void setEntityListeners(JpaEntityListeners entityListeners) {
44         this.entityListeners = entityListeners;
45     }
46
47     public boolean isExcludeDefaultListeners() {
48         return excludeDefaultListeners;
49     }
50
51     public void setExcludeDefaultListeners(boolean excludeDefaultListeners) {
52         this.excludeDefaultListeners = excludeDefaultListeners;
53     }
54
55     /**
56      * A setter used for XML serialization purposes that internally calls
57      * <em>setExcludeDefaultListeners(true)</em>.
58      */

59     public void setExcludeDefaultListenersTrue(Object JavaDoc value) {
60         setExcludeDefaultListeners(true);
61     }
62
63     public boolean isExcludeSuperclassListeners() {
64         return excludeSuperclassListeners;
65     }
66
67     public void setExcludeSuperclassListeners(boolean excludeSuperclassListeners) {
68         this.excludeSuperclassListeners = excludeSuperclassListeners;
69     }
70
71     /**
72      * A setter used for XML serialization purposes that internally calls
73      * <em>setExcludeSuperclassListeners(true)</em>.
74      */

75     public void setExcludeSuperclassListenersTrue(Object JavaDoc value) {
76         setExcludeSuperclassListeners(true);
77     }
78
79     public JpaIdClass getIdClass() {
80         return idClass;
81     }
82
83     public void setIdClass(JpaIdClass idClass) {
84         this.idClass = idClass;
85     }
86
87     public JpaLifecycleCallback getPostLoad() {
88         return postLoad;
89     }
90
91     public void setPostLoad(JpaLifecycleCallback postLoad) {
92         this.postLoad = postLoad;
93     }
94
95     public JpaLifecycleCallback getPostPersist() {
96         return postPersist;
97     }
98
99     public void setPostPersist(JpaLifecycleCallback postPersist) {
100         this.postPersist = postPersist;
101     }
102
103     public JpaLifecycleCallback getPostRemove() {
104         return postRemove;
105     }
106
107     public void setPostRemove(JpaLifecycleCallback postRemove) {
108         this.postRemove = postRemove;
109     }
110
111     public JpaLifecycleCallback getPostUpdate() {
112         return postUpdate;
113     }
114
115     public void setPostUpdate(JpaLifecycleCallback postUpdate) {
116         this.postUpdate = postUpdate;
117     }
118
119     public JpaLifecycleCallback getPrePersist() {
120         return prePersist;
121     }
122
123     public void setPrePersist(JpaLifecycleCallback prePersist) {
124         this.prePersist = prePersist;
125     }
126
127     public JpaLifecycleCallback getPreRemove() {
128         return preRemove;
129     }
130
131     public void setPreRemove(JpaLifecycleCallback preRemove) {
132         this.preRemove = preRemove;
133     }
134
135     public JpaLifecycleCallback getPreUpdate() {
136         return preUpdate;
137     }
138
139     public void setPreUpdate(JpaLifecycleCallback preUpdate) {
140         this.preUpdate = preUpdate;
141     }
142 }
143
Popular Tags