1 2 3 package org.tigris.scarab.om; 4 5 import java.math.BigDecimal ; 6 import java.util.Date ; 7 import java.util.List ; 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 25 public abstract class BaseRModuleUserAttributeManager 26 extends AbstractBaseManager 27 { 28 29 protected static String MANAGED_CLASS = "org.tigris.scarab.om.RModuleUserAttribute"; 30 31 32 protected static String DEFAULT_MANAGER_CLASS 33 = "org.tigris.scarab.om.RModuleUserAttributeManager"; 34 35 41 public static RModuleUserAttributeManager getManager() 42 { 43 return (RModuleUserAttributeManager) 44 Torque.getManager(RModuleUserAttributeManager.MANAGED_CLASS, 45 RModuleUserAttributeManager.DEFAULT_MANAGER_CLASS); 46 } 47 48 54 public static RModuleUserAttribute getInstance() 55 throws TorqueException 56 { 57 return getManager().getInstanceImpl(); 58 } 59 60 67 public static RModuleUserAttribute getInstance(ObjectKey id) 68 throws TorqueException 69 { 70 return getManager().getInstanceImpl(id); 71 } 72 73 82 public static RModuleUserAttribute getInstance(ObjectKey id, boolean fromCache) 83 throws TorqueException 84 { 85 return getManager().getInstanceImpl(id, fromCache); 86 } 87 88 95 public static RModuleUserAttribute getInstance(Long id) 96 throws TorqueException 97 { 98 return getManager().getInstanceImpl(SimpleKey.keyFor(id)); 99 } 100 101 110 public static RModuleUserAttribute getInstance(Long id, boolean fromCache) 111 throws TorqueException 112 { 113 return getManager().getInstanceImpl(SimpleKey.keyFor(id), fromCache); 114 } 115 116 123 public static List getInstances(List ids) 124 throws TorqueException 125 { 126 return getManager().getInstancesImpl(ids); 127 } 128 129 138 public static List getInstances(List ids, boolean fromCache) 139 throws TorqueException 140 { 141 return getManager().getInstancesImpl(ids, fromCache); 142 } 143 144 public static void putInstance(Persistent om) 145 throws TorqueException 146 { 147 getManager().putInstanceImpl(om); 148 } 149 150 public static void clear() 151 throws TorqueException 152 { 153 getManager().clearImpl(); 154 } 155 156 public static boolean exists(RModuleUserAttribute obj) 157 throws TorqueException 158 { 159 return getManager().existsImpl(obj); 160 } 161 162 public static MethodResultCache getMethodResult() 163 { 164 return getManager().getMethodResultCache(); 165 } 166 167 public static void addCacheListener(CacheListener listener) 168 { 169 getManager().addCacheListenerImpl(listener); 170 } 171 172 177 public BaseRModuleUserAttributeManager() 178 throws TorqueException 179 { 180 setClassName("org.tigris.scarab.om.RModuleUserAttribute"); 181 } 182 183 186 protected RModuleUserAttribute getInstanceImpl() 187 throws TorqueException 188 { 189 RModuleUserAttribute obj = null; 190 try 191 { 192 obj = (RModuleUserAttribute) getOMInstance(); 193 } 194 catch (Exception e) 195 { 196 throw new TorqueException(e); 197 } 198 return obj; 199 } 200 201 202 207 protected RModuleUserAttribute getInstanceImpl(ObjectKey id) 208 throws TorqueException 209 { 210 return (RModuleUserAttribute) getOMInstance(id); 211 } 212 213 220 protected RModuleUserAttribute getInstanceImpl(ObjectKey id, boolean fromCache) 221 throws TorqueException 222 { 223 return (RModuleUserAttribute) getOMInstance(id, fromCache); 224 } 225 226 233 protected List getInstancesImpl(List ids) 234 throws TorqueException 235 { 236 return getOMs(ids); 237 } 238 239 248 protected List getInstancesImpl(List ids, boolean fromCache) 249 throws TorqueException 250 { 251 return getOMs(ids, fromCache); 252 } 253 254 257 protected boolean existsImpl(RModuleUserAttribute om) 258 throws TorqueException 259 { 260 Criteria crit = RModuleUserAttributePeer 261 .buildCriteria((RModuleUserAttribute)om); 262 return RModuleUserAttributePeer.doSelect(crit).size() > 0; 263 } 264 265 266 protected Persistent retrieveStoredOM(ObjectKey id) 267 throws TorqueException 268 { 269 return RModuleUserAttributePeer.retrieveByPK(id); 270 } 271 272 279 protected List retrieveStoredOMs(List ids) 280 throws TorqueException 281 { 282 return RModuleUserAttributePeer.retrieveByPKs(ids); 283 } 284 } 285 | Popular Tags |