1 package hero.entity; 2 3 import hero.interfaces.BnAgentLightValue; 4 import hero.interfaces.BnAgentPK; 5 import hero.interfaces.BnAgentValue; 6 import hero.interfaces.BnProjectLocal; 7 import hero.interfaces.BnUserLocal; 8 import hero.interfaces.InvalidValueException; 9 import hero.util.BonitaServiceLocator; 10 import hero.util.BonitaServiceException; 11 12 import java.util.Date ; 13 import java.util.Collection ; 14 15 import javax.ejb.CreateException ; 16 import javax.ejb.EJBException ; 17 import javax.ejb.EntityBean ; 18 import javax.ejb.EntityContext ; 19 import javax.ejb.RemoveException ; 20 21 22 79 80 public abstract class BnAgentBean 81 implements EntityBean ![JavaDoc](../../../cmn/javadoc.gif) 82 { 83 84 88 public EntityContext mContext; 89 90 94 95 99 115 public abstract String getId(); 116 117 123 public abstract void setId( String pId ); 124 125 137 public abstract int getState(); 138 139 146 public abstract void setState( int pState ); 147 148 159 161 168 170 182 public abstract String getName(); 183 184 190 public abstract void setName( String pName ); 191 192 204 public abstract String getDescription(); 205 206 213 public abstract void setDescription( String pDescription ); 214 215 229 public abstract BnUserLocal getCreator(); 230 231 238 public abstract void setCreator( BnUserLocal pCreator ); 239 240 249 public abstract BnProjectLocal getBnProject(); 250 251 258 public abstract void setBnProject(BnProjectLocal pProject); 259 260 269 public abstract Collection getOutEdges(); 270 271 277 public abstract void setOutEdges(Collection pEdges); 278 279 286 public abstract Date getCreationDate(); 287 288 294 public abstract void setCreationDate(Date pDate); 295 296 300 public abstract BnAgentValue getBnAgentValue(); 301 302 306 public abstract void setBnAgentValue(BnAgentValue v); 307 308 312 public abstract BnAgentLightValue getBnAgentLightValue(); 313 314 318 public boolean isActive() { 319 return (this.getState()==hero.interfaces.Constants.Ag.ACTIVE); 320 } 321 322 326 341 public BnAgentPK ejbCreate(BnAgentValue nd ) 342 throws 343 InvalidValueException, 344 EJBException , 345 CreateException ![JavaDoc](../../../cmn/javadoc.gif) 346 { 347 setBnAgentValue(nd); 348 this.setId(hero.interfaces.BnAgentUtil.generateGUID(this)); 349 return null; 351 } 352 353 368 public BnAgentPK ejbCreate(String name) 369 throws 370 InvalidValueException, 371 EJBException , 372 CreateException ![JavaDoc](../../../cmn/javadoc.gif) 373 { 374 this.setName(name); 375 this.setState(hero.interfaces.Constants.Ag.INACTIVE); 376 377 this.setId(hero.interfaces.BnAgentUtil.generateGUID(this)); 378 379 return null; 381 } 382 383 384 public void setEntityContext( EntityContext lContext ) 385 { 386 mContext = lContext; 387 } 388 389 public void unsetEntityContext() 390 { 391 mContext = null; 392 } 393 394 public void ejbActivate() 395 { 396 } 397 398 public void ejbPassivate() 399 { 400 } 401 402 public void ejbLoad() 403 { 404 } 405 406 public void ejbStore() 407 { 408 } 409 410 public void ejbRemove() 411 throws 412 RemoveException ![JavaDoc](../../../cmn/javadoc.gif) 413 { 414 } 415 416 } 417 | Popular Tags |