1 26 27 package org.objectweb.openccm.Components; 28 29 38 39 public abstract class CCMHomeWithPKImpl 40 extends CCMHomeBase 41 { 42 48 54 58 protected 59 CCMHomeWithPKImpl() 60 { 61 } 62 63 69 72 protected final java.lang.String 73 _component_uid_() 74 { 75 return _the_home_executor()._the_component_uid(); 76 } 77 78 81 protected final java.lang.String 82 _home_uid_() 83 { 84 return _the_home_executor()._the_home_uid(); 85 } 86 87 90 protected final org.objectweb.openccm.Containers.HomeServant 91 _home_servant_() 92 { 93 return _the_home_executor()._home_servant(); 94 } 95 96 108 protected final org.omg.Components.CCMObject 109 _create(org.omg.Components.PrimaryKeyBase key) 110 throws org.omg.Components.DuplicateKeyValue, 111 org.omg.Components.InvalidKey, 112 org.omg.Components.CreateFailure 113 { 114 org.omg.Components.CCMObject ref = null; 115 116 ref = _home_servant_().the_PCA().create_registered_component_reference(_home_servant_(), key); 118 listener_.on_create(ref); 119 120 components_.add(ref); 122 123 return ref; 124 } 125 126 129 protected final org.omg.Components.CCMObject 130 _find_by_primary_key(org.omg.Components.PrimaryKeyBase key) 131 throws org.omg.Components.UnknownKeyValue, 132 org.omg.Components.InvalidKey, 133 org.omg.Components.FinderFailure 134 { 135 throw new org.omg.Components.FinderFailure(); 140 150 } 151 152 155 protected final void 156 _remove(org.omg.Components.PrimaryKeyBase key) 157 throws org.omg.Components.UnknownKeyValue, 158 org.omg.Components.InvalidKey, 159 org.omg.Components.RemoveFailure 160 { 161 throw new org.omg.Components.RemoveFailure(); 166 176 } 177 178 181 protected final org.omg.Components.PrimaryKeyBase 182 _get_primary_key(org.omg.Components.CCMObject comp) 183 { 184 try 185 { 186 return comp.get_primary_key(); 187 } 188 catch(org.omg.Components.NoKeyAvailable ex) 189 { 190 } 192 return null; 193 } 194 195 201 209 public final void 210 remove_component(org.omg.Components.CCMObject comp) 211 throws org.omg.Components.RemoveFailure 212 { 213 listener_.on_remove(comp); 214 components_.remove(comp); 215 try 216 { 217 _remove(_get_primary_key(comp)); 218 } 219 catch(org.omg.Components.UnknownKeyValue ex) 220 { 221 } 223 catch(org.omg.Components.InvalidKey ex) 224 { 225 } 227 } 228 229 235 238 protected abstract org.objectweb.openccm.Containers.HomeExecutorWithPK 239 _the_home_executor(); 240 } 241 242 243 244 245 246 247 | Popular Tags |