1 package league.ejb.entity; 2 3 import javax.ejb.*; 4 5 10 public abstract class MatchBean implements javax.ejb.EntityBean , league.ejb.entity.MatchLocalBusiness { 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.sql.Timestamp getDatePlayed(); 72 public abstract void setDatePlayed(java.sql.Timestamp datePlayed); 73 74 public abstract java.util.Collection getResult(); 75 public abstract void setResult(java.util.Collection result); 76 77 79 public java.math.BigDecimal ejbCreate(java.math.BigDecimal id, java.sql.Timestamp datePlayed) throws javax.ejb.CreateException { 80 if (id == null) { 81 throw new javax.ejb.CreateException ("The field \"id\" must not be null"); 82 } 83 if (datePlayed == null) { 84 throw new javax.ejb.CreateException ("The field \"datePlayed\" must not be null"); 85 } 86 87 setId(id); 89 setDatePlayed(datePlayed); 90 91 return null; 92 } 93 94 public void ejbPostCreate(java.math.BigDecimal id, java.sql.Timestamp datePlayed) { 95 97 } 98 99 public abstract league.ejb.entity.RoundLocal getRound(); 100 101 public abstract void setRound(league.ejb.entity.RoundLocal round); 102 103 public abstract Integer ejbSelectMaxId() throws javax.ejb.FinderException ; 104 105 public java.math.BigDecimal ejbCreate(java.sql.Timestamp datePlayed) throws javax.ejb.CreateException { 106 int id=0; 108 try { 109 Integer maxId=ejbSelectMaxId(); 110 111 if (maxId!=null) id=maxId.intValue()+1; 112 } catch (javax.ejb.FinderException e) { 113 throw new javax.ejb.CreateException (); 114 } 115 setId(new java.math.BigDecimal (id)); 116 setDatePlayed(datePlayed); 117 return null; 118 } 119 120 public void ejbPostCreate(java.sql.Timestamp datePlayed) throws javax.ejb.CreateException { 121 } 123 } 124 | Popular Tags |