001: package org.tigris.scarab.om;
002:
003: import java.math.BigDecimal;
004: import java.util.Date;
005: import java.util.List;
006:
007: import org.apache.torque.Torque;
008: import org.apache.torque.TorqueException;
009: import org.apache.torque.manager.AbstractBaseManager;
010: import org.apache.torque.manager.CacheListener;
011: import org.apache.torque.manager.MethodResultCache;
012: import org.apache.torque.om.ObjectKey;
013: import org.apache.torque.om.SimpleKey;
014: import org.apache.torque.om.Persistent;
015: import org.apache.torque.util.Criteria;
016:
017: /**
018: * This class manages NotificationDefaultFilter objects.
019: * This class was autogenerated by Torque *
020: * You should not use this class directly. It should not even be
021: * extended all references should be to NotificationDefaultFilterManager
022: */
023: public abstract class BaseNotificationDefaultFilterManager extends
024: AbstractBaseManager {
025: /** The name of the manager */
026: protected static final String MANAGED_CLASS = "org.tigris.scarab.om.NotificationDefaultFilter";
027:
028: /** The name of our class to pass to Torque as the default manager. */
029: protected static final String DEFAULT_MANAGER_CLASS = "org.tigris.scarab.om.NotificationDefaultFilterManager";
030:
031: /**
032: * Retrieves an implementation of the manager, based on the settings in
033: * the configuration.
034: *
035: * @return an implementation of NotificationDefaultFilterManager.
036: */
037: public static NotificationDefaultFilterManager getManager() {
038: return (NotificationDefaultFilterManager) Torque.getManager(
039: NotificationDefaultFilterManager.MANAGED_CLASS,
040: NotificationDefaultFilterManager.DEFAULT_MANAGER_CLASS);
041: }
042:
043: /**
044: * Static accessor for the @see #getInstanceImpl().
045: *
046: * @return a <code>NotificationDefaultFilter</code> value
047: * @exception TorqueException if an error occurs
048: */
049: public static NotificationDefaultFilter getInstance()
050: throws TorqueException {
051: return getManager().getInstanceImpl();
052: }
053:
054: /**
055: * Static accessor for the @see #getInstanceImpl(ObjectKey).
056: *
057: * @param id an <code>ObjectKey</code> value
058: * @return a <code>NotificationDefaultFilter</code> value
059: * @exception TorqueException if an error occurs
060: */
061: public static NotificationDefaultFilter getInstance(ObjectKey id)
062: throws TorqueException {
063: return getManager().getInstanceImpl(id);
064: }
065:
066: /**
067: * Static accessor for the @see #getCachedInstanceImpl(ObjectKey).
068: * Loads <code>NotificationDefaultFilter</code> from cache, returns
069: * <code>null</code>, if instance is not in cache
070: *
071: * @param id an <code>ObjectKey</code> value
072: * @return a <code>NotificationDefaultFilter</code> value
073: * @exception TorqueException if an error occurs
074: */
075: public static NotificationDefaultFilter getCachedInstance(
076: ObjectKey id) throws TorqueException {
077: return getManager().getCachedInstanceImpl(id);
078: }
079:
080: /**
081: * Static accessor for the @see #getInstanceImpl(ObjectKey, boolean).
082: *
083: * @param id an <code>ObjectKey</code> value
084: * @param fromCache if true, look for cached NotificationDefaultFilters before loading
085: * from storage.
086: * @return a <code>NotificationDefaultFilter</code> value
087: * @exception TorqueException if an error occurs
088: */
089: public static NotificationDefaultFilter getInstance(ObjectKey id,
090: boolean fromCache) throws TorqueException {
091: return getManager().getInstanceImpl(id, fromCache);
092: }
093:
094: /**
095: * Static accessor for the @see #getInstancesImpl(List).
096: *
097: * @param ids a <code>List</code> value
098: * @return a <code>List</code> value
099: * @exception TorqueException if an error occurs
100: */
101: public static List getInstances(List ids) throws TorqueException {
102: return getManager().getInstancesImpl(ids);
103: }
104:
105: /**
106: * Static accessor for the @see #getInstancesImpl(List, boolean).
107: *
108: * @param ids a <code>List</code> value
109: * @param fromCache if true, look for cached NotificationDefaultFilters before loading
110: * from storage.
111: * @return a <code>List</code> value
112: * @exception TorqueException if an error occurs
113: */
114: public static List getInstances(List ids, boolean fromCache)
115: throws TorqueException {
116: return getManager().getInstancesImpl(ids, fromCache);
117: }
118:
119: public static void putInstance(Persistent om)
120: throws TorqueException {
121: getManager().putInstanceImpl(om);
122: }
123:
124: public static void clear() throws TorqueException {
125: getManager().clearImpl();
126: }
127:
128: public static boolean exists(NotificationDefaultFilter obj)
129: throws TorqueException {
130: return getManager().existsImpl(obj);
131: }
132:
133: public static MethodResultCache getMethodResult() {
134: return getManager().getMethodResultCache();
135: }
136:
137: public static void addCacheListener(CacheListener listener) {
138: getManager().addCacheListenerImpl(listener);
139: }
140:
141: /**
142: * Creates a new <code>BaseNotificationDefaultFilterManager</code> instance.
143: *
144: * @exception TorqueException if an error occurs
145: */
146: public BaseNotificationDefaultFilterManager()
147: throws TorqueException {
148: setClassName("org.tigris.scarab.om.NotificationDefaultFilter");
149: }
150:
151: /**
152: * Get a fresh instance of a NotificationDefaultFilterManager
153: */
154: protected NotificationDefaultFilter getInstanceImpl()
155: throws TorqueException {
156: NotificationDefaultFilter obj = null;
157: try {
158: obj = (NotificationDefaultFilter) getOMInstance();
159: } catch (Exception e) {
160: throw new TorqueException(e);
161: }
162: return obj;
163: }
164:
165: /**
166: * Get a NotificationDefaultFilter with the given id.
167: *
168: * @param id <code>ObjectKey</code> value
169: */
170: protected NotificationDefaultFilter getInstanceImpl(ObjectKey id)
171: throws TorqueException {
172: return (NotificationDefaultFilter) getOMInstance(id);
173: }
174:
175: /**
176: * Get a NotificationDefaultFilter with the given id from the cache. Returns
177: * <code>null</code> if instance is not in cache
178: *
179: * @param id <code>ObjectKey</code> value
180: */
181: protected NotificationDefaultFilter getCachedInstanceImpl(
182: ObjectKey id) throws TorqueException {
183: return (NotificationDefaultFilter) cacheGet(id);
184: }
185:
186: /**
187: * Get a NotificationDefaultFilter with the given id.
188: *
189: * @param id <code>ObjectKey</code> value
190: * @param fromCache if true, look for cached NotificationDefaultFilters before loading
191: * from storage.
192: */
193: protected NotificationDefaultFilter getInstanceImpl(ObjectKey id,
194: boolean fromCache) throws TorqueException {
195: return (NotificationDefaultFilter) getOMInstance(id, fromCache);
196: }
197:
198: /**
199: * Gets a list of NotificationDefaultFilters based on id's.
200: *
201: * @param ids a List of <code>ObjectKeys</code> value
202: * @return a <code>List</code> of NotificationDefaultFilters
203: * @exception TorqueException if an error occurs
204: */
205: protected List getInstancesImpl(List ids) throws TorqueException {
206: return getOMs(ids);
207: }
208:
209: /**
210: * Gets a list of NotificationDefaultFilters based on id's.
211: *
212: * @param ids a List of <code>ObjectKeys</code> value
213: * @param fromCache if true, look for cached NotificationDefaultFilters before loading
214: * from storage.
215: * @return a <code>List</code> of NotificationDefaultFilters
216: * @exception TorqueException if an error occurs
217: */
218: protected List getInstancesImpl(List ids, boolean fromCache)
219: throws TorqueException {
220: return getOMs(ids, fromCache);
221: }
222:
223: /**
224: * check for a duplicate project name
225: */
226: protected boolean existsImpl(NotificationDefaultFilter om)
227: throws TorqueException {
228: Criteria crit = NotificationDefaultFilterPeer
229: .buildCriteria((NotificationDefaultFilter) om);
230: return NotificationDefaultFilterPeer.doSelect(crit).size() > 0;
231: }
232:
233: protected Persistent retrieveStoredOM(ObjectKey id)
234: throws TorqueException {
235: return NotificationDefaultFilterPeer.retrieveByPK(id);
236: }
237:
238: /**
239: * Gets a list of ModuleEntities based on id's.
240: *
241: * @param ids a <code>NumberKey[]</code> value
242: * @return a <code>List</code> value
243: * @exception TorqueException if an error occurs
244: */
245: protected List retrieveStoredOMs(List ids) throws TorqueException {
246: return NotificationDefaultFilterPeer.retrieveByPKs(ids);
247: }
248: }
|