1 package org.tigris.scarab.om; 2 3 48 49 import java.util.List ; 50 import java.util.LinkedList ; 51 import java.util.HashMap ; 52 import org.apache.torque.TorqueException; 53 import org.apache.torque.manager.CacheListener; 54 import org.apache.torque.om.Persistent; 55 56 61 public class IssueTypeManager 62 extends BaseIssueTypeManager 63 implements CacheListener 64 { 65 70 public IssueTypeManager() 71 throws TorqueException 72 { 73 super(); 74 setRegion(getClassName().replace('.', '_')); 75 validFields = new HashMap (); 76 validFields.put(IssueTypePeer.ISSUE_TYPE_ID, null); 77 } 78 79 protected Persistent putInstanceImpl(Persistent om) 80 throws TorqueException 81 { 82 Persistent oldOm = super.putInstanceImpl(om); 83 List listeners = (List )listenersMap.get(IssueTypePeer.ISSUE_TYPE_ID); 84 notifyListeners(listeners, oldOm, om); 85 return oldOm; 86 } 87 88 91 protected void registerAsListener() 92 { 93 AttributeGroupManager.addCacheListener(this); 94 } 95 96 public void addedObject(Persistent om) 97 { 98 if (om instanceof AttributeGroup) 99 { 100 getMethodResult().clear(); 101 } 102 } 103 104 public void refreshedObject(Persistent om) 105 { 106 addedObject(om); 107 } 108 109 110 public List getInterestedFields() 111 { 112 List interestedCacheFields = new LinkedList (); 113 interestedCacheFields.add(AttributeGroupPeer.MODULE_ID); 114 return interestedCacheFields; 115 } 116 117 } 118 | Popular Tags |