KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > tigris > scarab > om > BaseRModuleAttributeManager


1
2
3 package org.tigris.scarab.om;
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 RModuleAttribute objects.
21  * This class was autogenerated by Torque *
22  * You should not use this class directly. It should not even be
23  * extended all references should be to RModuleAttributeManager
24  */

25 public abstract class BaseRModuleAttributeManager
26     extends AbstractBaseManager
27 {
28     /** The name of the manager */
29     protected static String JavaDoc MANAGED_CLASS = "org.tigris.scarab.om.RModuleAttribute";
30
31     /** The name of our class to pass to Torque as the default manager. */
32     protected static String JavaDoc DEFAULT_MANAGER_CLASS
33         = "org.tigris.scarab.om.RModuleAttributeManager";
34
35     /**
36      * Retrieves an implementation of the manager, based on the settings in
37      * the configuration.
38      *
39      * @return an implementation of RModuleAttributeManager.
40      */

41     public static RModuleAttributeManager getManager()
42     {
43         return (RModuleAttributeManager)
44             Torque.getManager(RModuleAttributeManager.MANAGED_CLASS,
45                 RModuleAttributeManager.DEFAULT_MANAGER_CLASS);
46     }
47
48     /**
49      * Static accessor for the @see #getInstanceImpl().
50      *
51      * @return a <code>RModuleAttribute</code> value
52      * @exception TorqueException if an error occurs
53      */

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

67     public static RModuleAttribute getInstance(ObjectKey id)
68         throws TorqueException
69     {
70         return getManager().getInstanceImpl(id);
71     }
72
73     /**
74      * Static accessor for the @see #getInstanceImpl(ObjectKey, boolean).
75      *
76      * @param id an <code>ObjectKey</code> value
77      * @param fromCache if true, look for cached RModuleAttributes before loading
78      * from storage.
79      * @return a <code>RModuleAttribute</code> value
80      * @exception TorqueException if an error occurs
81      */

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

96     public static List JavaDoc getInstances(List JavaDoc ids)
97         throws TorqueException
98     {
99         return getManager().getInstancesImpl(ids);
100     }
101
102     /**
103      * Static accessor for the @see #getInstancesImpl(List, boolean).
104      *
105      * @param ids a <code>List</code> value
106      * @param fromCache if true, look for cached RModuleAttributes before loading
107      * from storage.
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(RModuleAttribute 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>BaseRModuleAttributeManager</code> instance.
147      *
148      * @exception TorqueException if an error occurs
149      */

150     public BaseRModuleAttributeManager()
151         throws TorqueException
152     {
153         setClassName("org.tigris.scarab.om.RModuleAttribute");
154     }
155
156     /**
157      * Get a fresh instance of a RModuleAttributeManager
158      */

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

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

193     protected RModuleAttribute getInstanceImpl(ObjectKey id, boolean fromCache)
194         throws TorqueException
195     {
196         return (RModuleAttribute) getOMInstance(id, fromCache);
197     }
198
199     /**
200      * Gets a list of RModuleAttributes based on id's.
201      *
202      * @param ids a List of <code>ObjectKeys</code> value
203      * @return a <code>List</code> of RModuleAttributes
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 RModuleAttributes based on id's.
214      *
215      * @param ids a List of <code>ObjectKeys</code> value
216      * @param fromCache if true, look for cached RModuleAttributes before loading
217      * from storage.
218      * @return a <code>List</code> of RModuleAttributes
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(RModuleAttribute om)
231         throws TorqueException
232     {
233         Criteria crit = RModuleAttributePeer
234             .buildCriteria((RModuleAttribute)om);
235         return RModuleAttributePeer.doSelect(crit).size() > 0;
236     }
237
238
239     protected Persistent retrieveStoredOM(ObjectKey id)
240         throws TorqueException
241     {
242         return RModuleAttributePeer.retrieveByPK(id);
243     }
244
245     /**
246      * Gets a list of ModuleEntities based on id's.
247      *
248      * @param ids 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 RModuleAttributePeer.retrieveByPKs(ids);
256     }
257 }
258
Popular Tags