KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > caucho > amber > cfg > EntityListenerConfig


1 /*
2  * Copyright (c) 1998-2006 Caucho Technology -- all rights reserved
3  *
4  * This file is part of Resin(R) Open Source
5  *
6  * Each copy or derived work must preserve the copyright notice and this
7  * notice unmodified.
8  *
9  * Resin Open Source is free software; you can redistribute it and/or modify
10  * it under the terms of the GNU General Public License as published by
11  * the Free Software Foundation; either version 2 of the License, or
12  * (at your option) any later version.
13  *
14  * Resin Open Source is distributed in the hope that it will be useful,
15  * but WITHOUT ANY WARRANTY; without even the implied warranty of
16  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE, or any warranty
17  * of NON-INFRINGEMENT. See the GNU General Public License for more
18  * details.
19  *
20  * You should have received a copy of the GNU General Public License
21  * along with Resin Open Source; if not, write to the
22  *
23  * Free Software Foundation, Inc.
24  * 59 Temple Place, Suite 330
25  * Boston, MA 02111-1307 USA
26  *
27  * @author Rodrigo Westrupp
28  */

29
30 package com.caucho.amber.cfg;
31
32 /**
33  * <entity-listener> tag in the orm.xml
34  */

35 public class EntityListenerConfig {
36
37   // attributes
38
private String JavaDoc _className;
39
40   // elements
41
private PrePersistConfig _prePersist;
42   private PostPersistConfig _postPersist;
43   private PreRemoveConfig _preRemove;
44   private PostRemoveConfig _postRemove;
45   private PreUpdateConfig _preUpdate;
46   private PostUpdateConfig _postUpdate;
47   private PostLoadConfig _postLoad;
48
49   private AbstractListenerConfig _listener;
50
51   /**
52    * Returns the method name.
53    */

54   public String JavaDoc getMethodName()
55   {
56     return _listener.getMethodName();
57   }
58
59   /**
60    * Returns the listener.
61    */

62   public AbstractListenerConfig getListener()
63   {
64     return _listener;
65   }
66
67   /**
68    * Returns the class name.
69    */

70   public String JavaDoc getClassName()
71   {
72     return _className;
73   }
74
75   /**
76    * Sets the class name.
77    */

78   public void addClass(String JavaDoc className)
79   {
80     _className = className;
81   }
82
83   public PrePersistConfig getPrePersist()
84   {
85     return _prePersist;
86   }
87
88   public void setPrePersist(PrePersistConfig prePersist)
89   {
90     _listener = prePersist;
91     _prePersist = prePersist;
92   }
93
94   public PostPersistConfig getPostPersist()
95   {
96     return _postPersist;
97   }
98
99   public void setPostPersist(PostPersistConfig postPersist)
100   {
101     _listener = postPersist;
102     _postPersist = postPersist;
103   }
104
105   public PreRemoveConfig getPreRemove()
106   {
107     return _preRemove;
108   }
109
110   public void setPreRemove(PreRemoveConfig preRemove)
111   {
112     _listener = preRemove;
113     _preRemove = preRemove;
114   }
115
116   public PostRemoveConfig getPostRemove()
117   {
118     return _postRemove;
119   }
120
121   public void setPostRemove(PostRemoveConfig postRemove)
122   {
123     _listener = postRemove;
124     _postRemove = postRemove;
125   }
126
127   public PreUpdateConfig getPreUpdate()
128   {
129     return _preUpdate;
130   }
131
132   public void setPreUpdate(PreUpdateConfig preUpdate)
133   {
134     _listener = preUpdate;
135     _preUpdate = preUpdate;
136   }
137
138   public PostUpdateConfig getPostUpdate()
139   {
140     return _postUpdate;
141   }
142
143   public void setPostUpdate(PostUpdateConfig postUpdate)
144   {
145     _listener = postUpdate;
146     _postUpdate = postUpdate;
147   }
148
149   public PostLoadConfig getPostLoad()
150   {
151     return _postLoad;
152   }
153
154   public void setPostLoad(PostLoadConfig postLoad)
155   {
156     _listener = postLoad;
157     _postLoad = postLoad;
158   }
159 }
160
Popular Tags