KickJava   Java API By Example, From Geeks To Geeks.

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


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

10 public final class ResultPK implements java.io.Serializable JavaDoc {
11     
12     public java.math.BigDecimal JavaDoc teamId;
13     public java.math.BigDecimal JavaDoc matchId;
14     /**
15      * @see java.lang.Object#equals(java.lang.Object)
16      */

17     public boolean equals(java.lang.Object JavaDoc otherOb) {
18         
19         if (this == otherOb) {
20             return true;
21         }
22         if (!(otherOb instanceof league.ejb.entity.ResultPK)) {
23             return false;
24         }
25         league.ejb.entity.ResultPK other = (league.ejb.entity.ResultPK) otherOb;
26         return (
27                 
28                 (teamId==null?other.teamId==null:teamId.equals(other.teamId))
29                 &&
30                 (matchId==null?other.matchId==null:matchId.equals(other.matchId))
31                 
32                 );
33     }
34     
35     /**
36      * @see java.lang.Object#hashCode()
37      */

38     public int hashCode() {
39         return (
40                 
41                 (teamId==null?0:teamId.hashCode())
42                 ^
43                 (matchId==null?0:matchId.hashCode())
44                 
45                 );
46     }
47     
48 }
49
Popular Tags