KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > tigris > scarab > om > AttributeGroupPeer


1 package org.tigris.scarab.om;
2
3
4 // Turbine classes
5
import org.apache.torque.TorqueException;
6 import org.apache.torque.om.ObjectKey;
7
8 // Scarab classes
9
import org.tigris.scarab.services.cache.ScarabCache;
10
11 /**
12  * You should add additional methods to this class to meet the
13  * application requirements. This class will only be generated as
14  * long as it does not already exist in the output directory.
15  */

16 public class AttributeGroupPeer
17     extends org.tigris.scarab.om.BaseAttributeGroupPeer
18 {
19     private static final String JavaDoc ATTRIBUTEGROUP_PEER =
20         "AttributeGroupPeer";
21     private static final String JavaDoc RETRIEVE_BY_PK =
22         "retrieveByPK";
23
24     /**
25      * Retrieve a single object by pk
26      *
27      * @param ObjectKey pk
28      */

29     public static AttributeGroup retrieveByPK(ObjectKey pk)
30         throws TorqueException
31     {
32         AttributeGroup result = null;
33         Object JavaDoc obj = ScarabCache.get(ATTRIBUTEGROUP_PEER, RETRIEVE_BY_PK, pk);
34         if (obj == null)
35         {
36             result = BaseAttributeGroupPeer.retrieveByPK(pk);
37             ScarabCache.put(result, ATTRIBUTEGROUP_PEER, RETRIEVE_BY_PK, pk);
38         }
39         else
40         {
41             result = (AttributeGroup)obj;
42         }
43         return result;
44     }
45 }
46
Popular Tags