1 package hero.entity; 2 3 import hero.interfaces.BnProjectConfigLocal; 4 import hero.interfaces.BnProjectConfigPK; 5 import hero.interfaces.BnProjectConfigValue; 6 import hero.interfaces.BnProjectLocal; 7 import hero.interfaces.InvalidValueException; 8 import hero.interfaces.Constants; 9 10 import hero.util.BonitaServiceLocator; 11 import hero.util.BonitaServiceException; 12 import hero.util.values.BonitaConfigValue; 13 14 import javax.ejb.CreateException ; 15 import javax.ejb.EJBException ; 16 import javax.ejb.EntityBean ; 17 import javax.ejb.EntityContext ; 18 import javax.ejb.RemoveException ; 19 20 63 public abstract class BnProjectConfigBean 64 implements EntityBean 65 { 66 67 71 public EntityContext mContext; 72 73 74 78 90 public abstract String getId(); 91 92 98 public abstract void setId( String pId ); 99 100 109 public abstract boolean getJMS(); 110 111 118 public abstract void setJMS( boolean jms); 119 120 129 public abstract boolean getLog(); 130 131 138 public abstract void setLog( boolean log); 139 140 149 public abstract String getLogLevel(); 150 151 158 public abstract void setLogLevel( String traceLevel); 159 160 169 public abstract boolean getTrace(); 170 171 178 public abstract void setTrace( boolean trace); 179 180 189 public abstract String getTraceLevel(); 190 191 198 public abstract void setTraceLevel( String traceLevel); 199 200 209 public abstract String getHistoric(); 210 211 218 public abstract void setHistoric( String historic); 219 220 229 public abstract BnProjectLocal getBnProject(); 230 231 238 public abstract void setBnProject(BnProjectLocal pProject); 239 240 244 public abstract BnProjectConfigValue getBnProjectConfigValue(); 245 246 250 public abstract void setBnProjectConfigValue(BnProjectConfigValue v); 251 252 256 271 public BnProjectConfigPK ejbCreate(BonitaConfigValue project, String instance) throws InvalidValueException, EJBException , CreateException 272 { 273 if (instance.matches(".*_instance.*")) 274 { 275 this.setJMS(project.getJms()); 276 this.setLog(project.getLog()); 277 this.setTrace(project.getTrace()); 278 this.setHistoric(project.getHistoric()); 279 this.setLogLevel(project.getLogLevel()); 280 this.setTraceLevel(project.getTraceLevel()); 281 this.setId(hero.interfaces.BnProjectConfigUtil.generateGUID(this)); 282 } 283 else 284 { 285 this.setJMS(true); 286 this.setLog(true); 287 this.setTrace(true); 288 this.setHistoric(Constants.TRANSFER); 289 this.setLogLevel(Constants.DEBUG); 290 this.setTraceLevel(Constants.DEBUG); 291 this.setId(hero.interfaces.BnProjectConfigUtil.generateGUID(this)); 292 } 293 294 return null; 295 } 296 297 298 313 public BnProjectConfigPK ejbCreate() throws InvalidValueException, EJBException , CreateException 314 { 315 this.setJMS(true); 316 this.setLog(true); 317 this.setTrace(true); 318 this.setHistoric(Constants.TRANSFER); 319 this.setLogLevel(Constants.DEBUG); 320 this.setTraceLevel(Constants.DEBUG); 321 this.setId(hero.interfaces.BnProjectConfigUtil.generateGUID(this)); 322 return null; 323 } 324 325 340 public BnProjectConfigPK ejbCreate(BnProjectConfigValue pProjectConfig) 341 throws 342 CreateException 343 { 344 this.setBnProjectConfigValue(pProjectConfig); 345 this.setId(hero.interfaces.BnProjectConfigUtil.generateGUID(this)); 346 347 return null; 348 } 349 350 351 public void ejbPostCreate( ) 352 { 353 } 354 355 public void setEntityContext( EntityContext lContext ) 356 { 357 mContext = lContext; 358 } 359 360 public void unsetEntityContext() 361 { 362 mContext = null; 363 } 364 365 public void ejbActivate() 366 { 367 } 368 369 public void ejbPassivate() 370 { 371 } 372 373 public void ejbLoad() 374 { 375 } 376 377 public void ejbStore() 378 { 379 } 380 381 public void ejbRemove() 382 throws 383 RemoveException 384 { 385 } 386 387 } 388 | Popular Tags |