001         package com.croftsoft.apps.wyrm.entity;
002    
003         import java.security.SecureRandom;
004         import java.util.Random;
005    
006         import javax.ejb.*;
007    
008         /*********************************************************************
009         * The player character bean.
010         *
011         * @version
012         *   2002-11-04
013         * @since
014         *   2002-09-30
015         * @author
016         *   <a href="http://alumni.caltech.edu/~croft">David Wallace Croft</a>
017         *********************************************************************/
018    
019         public abstract class  PcBean
020           implements EntityBean
021         //////////////////////////////////////////////////////////////////////
022         //////////////////////////////////////////////////////////////////////
023         {
024    
025         public abstract Long    getId     ( );
026    
027         public abstract String  getName   ( );
028    
029         public abstract String  getState  ( );
030    
031         public abstract long    getHealth ( );
032    
033         public abstract long    getWealth ( );
034    
035         public abstract long    getLevel  ( );
036    
037         public abstract long    getExperience ( );
038    
039         //
040    
041         public abstract void  setId         ( Long    id         );
042    
043         public abstract void  setName       ( String  name       );
044    
045         public abstract void  setState      ( String  state      );
046    
047         public abstract void  setHealth     ( long    health     );
048    
049         public abstract void  setWealth     ( long    wealth     );
050    
051         public abstract void  setLevel      ( long    level      );
052    
053         public abstract void  setExperience ( long    experience );
054    
055         //
056    
057         private static final Random  random = new SecureRandom ( );
058    
059         //////////////////////////////////////////////////////////////////////
060         //////////////////////////////////////////////////////////////////////
061    
062         public Long  ejbCreate ( )
063           throws CreateException
064         //////////////////////////////////////////////////////////////////////
065         {
066           setId ( new Long ( random.nextLong ( ) ) );
067    
068           return null;
069         }
070    
071         public void  ejbPostCreate ( ) { }
072    
073         public void  setEntityContext ( EntityContext  ctx ) { }
074    
075         public void  unsetEntityContext ( ) { }
076    
077         public void  ejbActivate ( ) { }
078    
079         public void  ejbPassivate ( ) { }
080    
081         public void  ejbLoad ( ) { }
082    
083         public void  ejbStore ( ) { }
084    
085         public void  ejbRemove ( ) { }
086    
087         //////////////////////////////////////////////////////////////////////
088         //////////////////////////////////////////////////////////////////////
089         }