KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > league > ejb > entity > PlaceInGroupBean


1 package league.ejb.entity;
2
3 import javax.ejb.*;
4
5 /**
6  * This is the bean class for the PlaceInGroup enterprise bean.
7  * Created Mar 9, 2005 1:34:55 PM
8  * @author honza
9  */

10 public abstract class PlaceInGroupBean implements javax.ejb.EntityBean JavaDoc, league.ejb.entity.PlaceInGroupLocalBusiness {
11     private javax.ejb.EntityContext JavaDoc context;
12     
13     // <editor-fold defaultstate="collapsed" desc="EJB infrastructure methods. Click on the + sign on the left to edit the code.">
14
// TODO Consider creating Transfer Object to encapsulate data
15
// TODO Review finder methods
16
/**
17      * @see javax.ejb.EntityBean#setEntityContext(javax.ejb.EntityContext)
18      */

19     public void setEntityContext(javax.ejb.EntityContext JavaDoc aContext) {
20         context = aContext;
21     }
22     
23     /**
24      * @see javax.ejb.EntityBean#ejbActivate()
25      */

26     public void ejbActivate() {
27         
28     }
29     
30     /**
31      * @see javax.ejb.EntityBean#ejbPassivate()
32      */

33     public void ejbPassivate() {
34         
35     }
36     
37     /**
38      * @see javax.ejb.EntityBean#ejbRemove()
39      */

40     public void ejbRemove() {
41         
42     }
43     
44     /**
45      * @see javax.ejb.EntityBean#unsetEntityContext()
46      */

47     public void unsetEntityContext() {
48         context = null;
49     }
50     
51     /**
52      * @see javax.ejb.EntityBean#ejbLoad()
53      */

54     public void ejbLoad() {
55         
56     }
57     
58     /**
59      * @see javax.ejb.EntityBean#ejbStore()
60      */

61     public void ejbStore() {
62         
63     }
64     // </editor-fold>
65

66     // <editor-fold desc="CMP fields and relationships.">
67

68     public abstract java.math.BigDecimal JavaDoc getPlace();
69     public abstract void setPlace(java.math.BigDecimal JavaDoc place);
70     
71     public abstract java.math.BigDecimal JavaDoc getGroupId();
72     public abstract void setGroupId(java.math.BigDecimal JavaDoc groupId);
73     
74     public abstract java.math.BigDecimal JavaDoc getTeamId();
75     public abstract void setTeamId(java.math.BigDecimal JavaDoc teamId);
76     
77     public abstract league.ejb.entity.GroupsLocal getGroups();
78     public abstract void setGroups(league.ejb.entity.GroupsLocal groups);
79     
80     public abstract league.ejb.entity.TeamLocal getTeam();
81     public abstract void setTeam(league.ejb.entity.TeamLocal team);
82     
83     // </editor-fold>
84

85     public league.ejb.entity.PlaceInGroupPK ejbCreate(java.math.BigDecimal JavaDoc place, java.math.BigDecimal JavaDoc groupId, java.math.BigDecimal JavaDoc teamId, league.ejb.entity.GroupsLocal groups, league.ejb.entity.TeamLocal team) throws javax.ejb.CreateException JavaDoc {
86         if (place == null) {
87             throw new javax.ejb.CreateException JavaDoc("The field \"place\" must not be null");
88         }
89         if (groupId == null) {
90             throw new javax.ejb.CreateException JavaDoc("The field \"groupId\" must not be null");
91         }
92         if (teamId == null) {
93             throw new javax.ejb.CreateException JavaDoc("The field \"teamId\" must not be null");
94         }
95         if (groups == null) {
96             throw new javax.ejb.CreateException JavaDoc("The field \"groups\" must not be null");
97         }
98         if (team == null) {
99             throw new javax.ejb.CreateException JavaDoc("The field \"team\" must not be null");
100         }
101         
102         // TODO add additional validation code, throw CreateException if data is not valid
103
setPlace(place);
104         setGroupId(groupId);
105         setTeamId(teamId);
106         
107         return null;
108     }
109     
110     public void ejbPostCreate(java.math.BigDecimal JavaDoc place, java.math.BigDecimal JavaDoc groupId, java.math.BigDecimal JavaDoc teamId, league.ejb.entity.GroupsLocal groups, league.ejb.entity.TeamLocal team) {
111         // TODO populate relationships here if appropriate
112
setGroups(groups);
113         setTeam(team);
114         
115         
116     }
117
118     public league.ejb.entity.PlaceInGroupPK ejbCreate(league.ejb.entity.GroupsLocal gl, league.ejb.entity.TeamLocal tl, java.lang.Integer JavaDoc place) throws javax.ejb.CreateException JavaDoc {
119         //TODO implement ejbCreate
120
setPlace(new java.math.BigDecimal JavaDoc(place.intValue()));
121         setGroupId(gl.getId());
122         setTeamId(tl.getId());
123         return null;
124     }
125
126     public void ejbPostCreate(league.ejb.entity.GroupsLocal gl, league.ejb.entity.TeamLocal tl, java.lang.Integer JavaDoc place) throws javax.ejb.CreateException JavaDoc {
127         //TODO implement ejbPostCreate
128
//setGroups(gl);
129
//setTeam(tl);
130
}
131
132     public abstract java.lang.Integer JavaDoc getStartPoints();
133
134     public abstract void setStartPoints(java.lang.Integer JavaDoc startPoints);
135 }
136
Popular Tags