1 package league.ejb.entity; 2 3 import javax.ejb.*; 4 5 10 public abstract class LeagueBean implements javax.ejb.EntityBean , league.ejb.entity.LeagueLocalBusiness { 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.sql.Timestamp getStartDate(); 78 public abstract void setStartDate(java.sql.Timestamp startDate); 79 80 public abstract java.sql.Timestamp getEndDate(); 81 public abstract void setEndDate(java.sql.Timestamp endDate); 82 83 public abstract java.util.Collection getRound(); 84 public abstract void setRound(java.util.Collection round); 85 86 88 public java.math.BigDecimal ejbCreate(java.math.BigDecimal id, java.lang.String name, java.lang.String note, java.sql.Timestamp startDate, java.sql.Timestamp endDate) throws javax.ejb.CreateException { 89 if (id == null) { 90 throw new javax.ejb.CreateException ("The field \"id\" must not be null"); 91 } 92 if (name == null) { 93 throw new javax.ejb.CreateException ("The field \"name\" must not be null"); 94 } 95 if (startDate == null) { 96 throw new javax.ejb.CreateException ("The field \"startDate\" must not be null"); 97 } 98 if (endDate == null) { 99 throw new javax.ejb.CreateException ("The field \"endDate\" must not be null"); 100 } 101 102 setId(id); 104 setName(name); 105 setNote(note); 106 setStartDate(startDate); 107 setEndDate(endDate); 108 109 return null; 110 } 111 112 public void ejbPostCreate(java.math.BigDecimal id, java.lang.String name, java.lang.String note, java.sql.Timestamp startDate, java.sql.Timestamp endDate) { 113 115 } 116 117 public java.math.BigDecimal ejbCreate(java.lang.String name, java.util.Date startDate, java.util.Date endDate, java.lang.String note) throws javax.ejb.CreateException { 118 int id=0; 120 try { 121 Integer maxId=ejbSelectMaxId(); 122 123 if (maxId!=null) id=maxId.intValue()+1; 124 } catch (javax.ejb.FinderException e) { 125 throw new javax.ejb.CreateException (); 126 } 127 setId(new java.math.BigDecimal (id)); 128 setName(name); 129 setNote(note); 130 setStartDate(new java.sql.Timestamp (startDate.getTime())); 131 setEndDate(new java.sql.Timestamp (endDate.getTime())); 132 return null; 133 } 134 135 public void ejbPostCreate(java.lang.String name, java.util.Date startDate, java.util.Date endDate, java.lang.String note) throws javax.ejb.CreateException { 136 } 138 139 public abstract java.lang.Integer ejbSelectMaxId() throws javax.ejb.FinderException ; 140 141 public abstract java.util.Collection getTeams(); 142 143 public abstract void setTeams(java.util.Collection teams); 144 145 } 146 | Popular Tags |