| 1 package league.ejb.entity; 2 3 import javax.ejb.*; 4 5 10 public abstract class GroupsBean implements javax.ejb.EntityBean , league.ejb.entity.GroupsLocalBusiness { 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.math.BigDecimal getPlace(); 75 public abstract void setPlace(java.math.BigDecimal place); 76 77 public abstract league.ejb.entity.RoundLocal getRoundId(); 78 public abstract void setRoundId(league.ejb.entity.RoundLocal roundId); 79 80 public abstract java.util.Collection getPlaceInGroup(); 81 public abstract void setPlaceInGroup(java.util.Collection placeInGroup); 82 83 85 public java.math.BigDecimal ejbCreate(java.math.BigDecimal id, java.lang.String name, java.math.BigDecimal place, league.ejb.entity.RoundLocal roundId) 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 if (place == null) { 93 throw new javax.ejb.CreateException ("The field \"place\" must not be null"); 94 } 95 if (roundId == null) { 96 throw new javax.ejb.CreateException ("The field \"roundId\" must not be null"); 97 } 98 99 setId(id); 101 setName(name); 102 setPlace(place); 103 104 return null; 105 } 106 107 public void ejbPostCreate(java.math.BigDecimal id, java.lang.String name, java.math.BigDecimal place, league.ejb.entity.RoundLocal roundId) { 108 setRoundId(roundId); 110 111 } 112 113 public java.math.BigDecimal ejbCreate(java.lang.String name, java.math.BigDecimal place, league.ejb.entity.RoundLocal roundId) throws javax.ejb.CreateException { 114 115 if (name == null) { 116 throw new javax.ejb.CreateException ("The field \"name\" must not be null"); 117 } 118 if (place == null) { 119 throw new javax.ejb.CreateException ("The field \"place\" must not be null"); 120 } 121 if (roundId == null) { 122 throw new javax.ejb.CreateException ("The field \"roundId\" must not be null"); 123 } 124 125 int id=0; 127 try { 128 Integer maxId=ejbSelectMaxId(); 129 130 if (maxId!=null) id=maxId.intValue()+1; 131 } catch (javax.ejb.FinderException e) { 132 throw new javax.ejb.CreateException (); 133 } 134 setId(new java.math.BigDecimal (id)); 135 setName(name); 136 setPlace(new java.math.BigDecimal (place.intValue())); 137 138 return null; 139 } 140 141 public void ejbPostCreate(java.lang.String name, java.math.BigDecimal place, league.ejb.entity.RoundLocal roundId) { 142 setRoundId(roundId); 144 145 } 146 147 public abstract java.lang.Integer ejbSelectMaxId() throws javax.ejb.FinderException ; 148 149 } 150 | Popular Tags |