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 BaseIssueVoteManager 26 extends AbstractBaseManager 27 { 28 29 protected static String MANAGED_CLASS = "org.tigris.scarab.om.IssueVote"; 30 31 32 protected static String DEFAULT_MANAGER_CLASS 33 = "org.tigris.scarab.om.IssueVoteManager"; 34 35 41 public static IssueVoteManager getManager() 42 { 43 return (IssueVoteManager) 44 Torque.getManager(IssueVoteManager.MANAGED_CLASS, 45 IssueVoteManager.DEFAULT_MANAGER_CLASS); 46 } 47 48 54 public static IssueVote getInstance() 55 throws TorqueException 56 { 57 return getManager().getInstanceImpl(); 58 } 59 60 67 public static IssueVote getInstance(ObjectKey id) 68 throws TorqueException 69 { 70 return getManager().getInstanceImpl(id); 71 } 72 73 82 public static IssueVote getInstance(ObjectKey id, boolean fromCache) 83 throws TorqueException 84 { 85 return getManager().getInstanceImpl(id, fromCache); 86 } 87 88 89 96 public static List getInstances(List ids) 97 throws TorqueException 98 { 99 return getManager().getInstancesImpl(ids); 100 } 101 102 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(IssueVote 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 BaseIssueVoteManager() 151 throws TorqueException 152 { 153 setClassName("org.tigris.scarab.om.IssueVote"); 154 } 155 156 159 protected IssueVote getInstanceImpl() 160 throws TorqueException 161 { 162 IssueVote obj = null; 163 try 164 { 165 obj = (IssueVote) getOMInstance(); 166 } 167 catch (Exception e) 168 { 169 throw new TorqueException(e); 170 } 171 return obj; 172 } 173 174 175 180 protected IssueVote getInstanceImpl(ObjectKey id) 181 throws TorqueException 182 { 183 return (IssueVote) getOMInstance(id); 184 } 185 186 193 protected IssueVote getInstanceImpl(ObjectKey id, boolean fromCache) 194 throws TorqueException 195 { 196 return (IssueVote) 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(IssueVote om) 231 throws TorqueException 232 { 233 Criteria crit = IssueVotePeer 234 .buildCriteria((IssueVote)om); 235 return IssueVotePeer.doSelect(crit).size() > 0; 236 } 237 238 239 protected Persistent retrieveStoredOM(ObjectKey id) 240 throws TorqueException 241 { 242 return IssueVotePeer.retrieveByPK(id); 243 } 244 245 252 protected List retrieveStoredOMs(List ids) 253 throws TorqueException 254 { 255 return IssueVotePeer.retrieveByPKs(ids); 256 } 257 } 258 | Popular Tags |