1 package org.tigris.scarab.om; 2 3 48 49 import org.apache.torque.TorqueException; 51 import org.apache.torque.om.ObjectKey; 52 53 import org.tigris.scarab.services.cache.ScarabCache; 55 56 65 public class AttachmentPeer 66 extends org.tigris.scarab.om.BaseAttachmentPeer 67 { 68 private static final String ATTACHMENT_PEER = 69 "AttachmentPeer"; 70 private static final String RETRIEVE_BY_PK = 71 "retrieveByPK"; 72 73 78 public static Attachment retrieveByPK(ObjectKey pk) 79 throws TorqueException 80 { 81 Attachment result = null; 82 Object obj = ScarabCache.get(ATTACHMENT_PEER, RETRIEVE_BY_PK, pk); 83 if (obj == null) 84 { 85 result = BaseAttachmentPeer.retrieveByPK(pk); 86 ScarabCache.put(result, ATTACHMENT_PEER, RETRIEVE_BY_PK, pk); 87 } 88 else 89 { 90 result = (Attachment)obj; 91 } 92 return result; 93 } 94 } 95 96 | Popular Tags |