1 package league.ejb.entity; 2 3 import javax.ejb.*; 4 5 10 public abstract class PlayerBean implements javax.ejb.EntityBean , league.ejb.entity.PlayerLocalBusiness { 11 private javax.ejb.EntityContext context; 12 13 19 public void setEntityContext(javax.ejb.EntityContext aContext) { 20 context = aContext; 21 } 22 23 26 public void ejbActivate() { 27 28 } 29 30 33 public void ejbPassivate() { 34 35 } 36 37 40 public void ejbRemove() { 41 42 } 43 44 47 public void unsetEntityContext() { 48 context = null; 49 } 50 51 54 public void ejbLoad() { 55 56 } 57 58 61 public void ejbStore() { 62 63 } 64 66 68 public abstract java.math.BigDecimal getId(); 69 public abstract void setId(java.math.BigDecimal id); 70 71 public abstract java.lang.String getName(); 72 public abstract void setName(java.lang.String name); 73 74 public abstract java.lang.String getNote(); 75 public abstract void setNote(java.lang.String note); 76 77 public abstract java.lang.String getUserid(); 78 public abstract void setUserid(java.lang.String userid); 79 80 public abstract java.util.Collection getTeamId(); 81 public abstract void setTeamId(java.util.Collection teamId); 82 83 85 public java.math.BigDecimal ejbCreate(java.math.BigDecimal id, java.lang.String name, java.lang.String note, java.lang.String userid) throws javax.ejb.CreateException { 86 if (id == null) { 87 throw new javax.ejb.CreateException ("The field \"id\" must not be null"); 88 } 89 if (name == null) { 90 throw new javax.ejb.CreateException ("The field \"name\" must not be null"); 91 } 92 93 setId(id); 95 setName(name); 96 setNote(note); 97 setUserid(userid); 98 99 return null; 100 } 101 102 public void ejbPostCreate(java.math.BigDecimal id, java.lang.String name, java.lang.String note, java.lang.String userid) { 103 105 } 106 107 public abstract java.lang.Integer ejbSelectMaxId() throws javax.ejb.FinderException ; 108 109 110 public java.math.BigDecimal ejbCreate(java.lang.String name, java.lang.String note, java.lang.String userid) throws javax.ejb.CreateException { 111 int id=0; 112 try { 113 Integer maxId=ejbSelectMaxId(); 114 115 if (maxId!=null) id=maxId.intValue()+1; 116 } catch (javax.ejb.FinderException e) { 117 throw new javax.ejb.CreateException (); 118 } 119 setId(new java.math.BigDecimal (id)); 120 setName(name); 121 setNote(note); 122 setUserid(userid); 123 return null; 124 } 125 126 public void ejbPostCreate(java.lang.String name, java.lang.String note, java.lang.String userid) throws javax.ejb.CreateException { 127 } 129 130 } 131 | Popular Tags |