1 2 3 package org.apache.jetspeed.om.security.turbine; 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 29 public abstract class BaseTurbineUserGroupRoleManager 30 extends AbstractBaseManager 31 { 32 33 protected static String MANAGED_CLASS = "org.apache.jetspeed.om.security.turbine.TurbineUserGroupRole"; 34 35 36 protected static String DEFAULT_MANAGER_CLASS 37 = "org.apache.jetspeed.om.security.turbine.TurbineUserGroupRoleManager"; 38 39 45 public static TurbineUserGroupRoleManager getManager() 46 { 47 return (TurbineUserGroupRoleManager) 48 Torque.getManager(TurbineUserGroupRoleManager.MANAGED_CLASS, 49 TurbineUserGroupRoleManager.DEFAULT_MANAGER_CLASS); 50 } 51 52 58 public static TurbineUserGroupRole getInstance() 59 throws TorqueException 60 { 61 return getManager().getInstanceImpl(); 62 } 63 64 71 public static TurbineUserGroupRole getInstance(ObjectKey id) 72 throws TorqueException 73 { 74 return getManager().getInstanceImpl(id); 75 } 76 77 84 public static TurbineUserGroupRole getInstance(ObjectKey id, boolean fromCache) 85 throws TorqueException 86 { 87 return getManager().getInstanceImpl(id, fromCache); 88 } 89 90 91 98 public static List getInstances(List ids) 99 throws TorqueException 100 { 101 return getManager().getInstancesImpl(ids); 102 } 103 104 111 public static List getInstances(List 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 150 public BaseTurbineUserGroupRoleManager() 151 throws TorqueException 152 { 153 setClassName("org.apache.jetspeed.om.security.turbine.TurbineUserGroupRole"); 154 } 155 156 159 protected TurbineUserGroupRole getInstanceImpl() 160 throws TorqueException 161 { 162 TurbineUserGroupRole obj = null; 163 try 164 { 165 obj = (TurbineUserGroupRole) getOMInstance(); 166 } 167 catch (Exception e) 168 { 169 throw new TorqueException(e); 170 } 171 return obj; 172 } 173 174 175 180 protected TurbineUserGroupRole getInstanceImpl(ObjectKey id) 181 throws TorqueException 182 { 183 return (TurbineUserGroupRole) getOMInstance(id); 184 } 185 186 193 protected TurbineUserGroupRole getInstanceImpl(ObjectKey id, boolean fromCache) 194 throws TorqueException 195 { 196 return (TurbineUserGroupRole) getOMInstance(id, fromCache); 197 } 198 199 206 protected List getInstancesImpl(List ids) 207 throws TorqueException 208 { 209 return getOMs(ids); 210 } 211 212 221 protected List getInstancesImpl(List ids, boolean fromCache) 222 throws TorqueException 223 { 224 return getOMs(ids, fromCache); 225 } 226 227 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 252 protected List retrieveStoredOMs(List ids) 253 throws TorqueException 254 { 255 return TurbineUserGroupRolePeer.retrieveByPKs(ids); 256 } 257 } 258 | Popular Tags |