KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > jetspeed > om > security > turbine > BaseTurbineUserGroupRoleManager


1
2
3 package org.apache.jetspeed.om.security.turbine;
4
5 import java.math.BigDecimal JavaDoc;
6 import java.util.Date JavaDoc;
7 import java.util.List JavaDoc;
8
9 import org.apache.torque.Torque;
10 import org.apache.torque.TorqueException;
11 import org.apache.torque.manager.AbstractBaseManager;
12 import org.apache.torque.manager.CacheListener;
13 import org.apache.torque.manager.MethodResultCache;
14 import org.apache.torque.om.ObjectKey;
15 import org.apache.torque.om.SimpleKey;
16 import org.apache.torque.om.Persistent;
17 import org.apache.torque.util.Criteria;
18
19 /**
20  * This class manages TurbineUserGroupRole objects.
21  * This class was autogenerated by Torque on:
22  *
23  * [Thu Apr 22 15:30:48 PDT 2004]
24  *
25   *
26  * You should not use this class directly. It should not even be
27  * extended all references should be to TurbineUserGroupRoleManager
28  */

29 public abstract class BaseTurbineUserGroupRoleManager
30     extends AbstractBaseManager
31 {
32     /** The name of the manager */
33     protected static String JavaDoc MANAGED_CLASS = "org.apache.jetspeed.om.security.turbine.TurbineUserGroupRole";
34
35     /** The name of our class to pass to Torque as the default manager. */
36     protected static String JavaDoc DEFAULT_MANAGER_CLASS
37         = "org.apache.jetspeed.om.security.turbine.TurbineUserGroupRoleManager";
38
39     /**
40      * Retrieves an implementation of the manager, based on the settings in
41      * the configuration.
42      *
43      * @return an implementation of TurbineUserGroupRoleManager.
44      */

45     public static TurbineUserGroupRoleManager getManager()
46     {
47         return (TurbineUserGroupRoleManager)
48             Torque.getManager(TurbineUserGroupRoleManager.MANAGED_CLASS,
49                 TurbineUserGroupRoleManager.DEFAULT_MANAGER_CLASS);
50     }
51
52     /**
53      * Static accessor for the @see #getInstanceImpl().
54      *
55      * @return a <code>TurbineUserGroupRole</code> value
56      * @exception TorqueException if an error occurs
57      */

58     public static TurbineUserGroupRole getInstance()
59         throws TorqueException
60     {
61         return getManager().getInstanceImpl();
62     }
63
64     /**
65      * Static accessor for the @see #getInstanceImpl(ObjectKey).
66      *
67      * @param id an <code>ObjectKey</code> value
68      * @return a <code>TurbineUserGroupRole</code> value
69      * @exception TorqueException if an error occurs
70      */

71     public static TurbineUserGroupRole getInstance(ObjectKey id)
72         throws TorqueException
73     {
74         return getManager().getInstanceImpl(id);
75     }
76
77     /**
78      * Static accessor for the @see #getInstanceImpl(ObjectKey, boolean).
79      *
80      * @param id an <code>ObjectKey</code> value
81      * @return a <code>TurbineUserGroupRole</code> value
82      * @exception TorqueException if an error occurs
83      */

84     public static TurbineUserGroupRole getInstance(ObjectKey id, boolean fromCache)
85         throws TorqueException
86     {
87         return getManager().getInstanceImpl(id, fromCache);
88     }
89
90
91     /**
92      * Static accessor for the @see #getInstancesImpl(List).
93      *
94      * @param ids a <code>List</code> value
95      * @return a <code>List</code> value
96      * @exception TorqueException if an error occurs
97      */

98     public static List JavaDoc getInstances(List JavaDoc ids)
99         throws TorqueException
100     {
101         return getManager().getInstancesImpl(ids);
102     }
103
104     /**
105      * Static accessor for the @see #getInstancesImpl(List, boolean).
106      *
107      * @param ids a <code>List</code> value
108      * @return a <code>List</code> value
109      * @exception TorqueException if an error occurs
110      */

111     public static List JavaDoc getInstances(List JavaDoc ids, boolean fromCache)
112         throws TorqueException
113     {
114         return getManager().getInstancesImpl(ids, fromCache);
115     }
116
117     public static void putInstance(Persistent om)
118         throws TorqueException
119     {
120         getManager().putInstanceImpl(om);
121     }
122
123     public static void clear()
124         throws TorqueException
125     {
126         getManager().clearImpl();
127     }
128
129     public static boolean exists(TurbineUserGroupRole obj)
130         throws TorqueException
131     {
132         return getManager().existsImpl(obj);
133     }
134
135     public static MethodResultCache getMethodResult()
136     {
137         return getManager().getMethodResultCache();
138     }
139
140     public static void addCacheListener(CacheListener listener)
141     {
142         getManager().addCacheListenerImpl(listener);
143     }
144
145     /**
146      * Creates a new <code>BaseTurbineUserGroupRoleManager</code> instance.
147      *
148      * @exception TorqueException if an error occurs
149      */

150     public BaseTurbineUserGroupRoleManager()
151         throws TorqueException
152     {
153         setClassName("org.apache.jetspeed.om.security.turbine.TurbineUserGroupRole");
154     }
155
156     /**
157      * Get a fresh instance of a TurbineUserGroupRoleManager
158      */

159     protected TurbineUserGroupRole getInstanceImpl()
160         throws TorqueException
161     {
162         TurbineUserGroupRole obj = null;
163         try
164         {
165             obj = (TurbineUserGroupRole) getOMInstance();
166         }
167         catch (Exception JavaDoc e)
168         {
169             throw new TorqueException(e);
170         }
171         return obj;
172     }
173
174
175     /**
176      * Get a TurbineUserGroupRole with the given id.
177      *
178      * @param id <code>ObjectKey</code> value
179      */

180     protected TurbineUserGroupRole getInstanceImpl(ObjectKey id)
181         throws TorqueException
182     {
183         return (TurbineUserGroupRole) getOMInstance(id);
184     }
185
186     /**
187      * Get a TurbineUserGroupRole with the given id.
188      *
189      * @param id <code>ObjectKey</code> value
190      * @param fromCache if true, look for cached TurbineUserGroupRoles before loading
191      * from storage.
192      */

193     protected TurbineUserGroupRole getInstanceImpl(ObjectKey id, boolean fromCache)
194         throws TorqueException
195     {
196         return (TurbineUserGroupRole) getOMInstance(id, fromCache);
197     }
198
199     /**
200      * Gets a list of TurbineUserGroupRoles based on id's.
201      *
202      * @param ids a List of <code>ObjectKeys</code> value
203      * @return a <code>List</code> of TurbineUserGroupRoles
204      * @exception TorqueException if an error occurs
205      */

206     protected List JavaDoc getInstancesImpl(List JavaDoc ids)
207         throws TorqueException
208     {
209         return getOMs(ids);
210     }
211
212     /**
213      * Gets a list of TurbineUserGroupRoles based on id's.
214      *
215      * @param ids a List of <code>ObjectKeys</code> value
216      * @param fromCache if true, look for cached TurbineUserGroupRoles before loading
217      * from storage.
218      * @return a <code>List</code> of TurbineUserGroupRoles
219      * @exception TorqueException if an error occurs
220      */

221     protected List JavaDoc getInstancesImpl(List JavaDoc ids, boolean fromCache)
222         throws TorqueException
223     {
224         return getOMs(ids, fromCache);
225     }
226
227     /**
228      * check for a duplicate project name
229      */

230     protected boolean existsImpl(TurbineUserGroupRole om)
231         throws TorqueException
232     {
233         Criteria crit = TurbineUserGroupRolePeer
234             .buildCriteria((TurbineUserGroupRole)om);
235         return TurbineUserGroupRolePeer.doSelect(crit).size() > 0;
236     }
237
238
239     protected Persistent retrieveStoredOM(ObjectKey id)
240         throws TorqueException
241     {
242         return TurbineUserGroupRolePeer.retrieveByPK(id);
243     }
244
245     /**
246      * Gets a list of ModuleEntities based on id's.
247      *
248      * @param moduleIds a <code>NumberKey[]</code> value
249      * @return a <code>List</code> value
250      * @exception TorqueException if an error occurs
251      */

252     protected List JavaDoc retrieveStoredOMs(List JavaDoc ids)
253         throws TorqueException
254     {
255         return TurbineUserGroupRolePeer.retrieveByPKs(ids);
256     }
257 }
258
Popular Tags