KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > hibernate > test > legacy > Up


1 //$Id: Up.java,v 1.1 2004/09/26 05:18:26 oneovthafew Exp $
2
package org.hibernate.test.legacy;
3
4 import java.io.Serializable JavaDoc;
5
6 /**
7  * @author Gavin King
8  */

9 public class Up implements Serializable JavaDoc {
10
11     private String JavaDoc id1;
12     private long id2;
13
14     public String JavaDoc getId1() {
15         return id1;
16     }
17
18     public long getId2() {
19         return id2;
20     }
21
22     public void setId1(String JavaDoc string) {
23         id1 = string;
24     }
25
26     public void setId2(long l) {
27         id2 = l;
28     }
29     
30     public boolean equals(Object JavaDoc other) {
31         if ( !(other instanceof Up) ) return false;
32         Up that = (Up) other;
33         return this.id1.equals(that.id1) && this.id2==that.id2;
34     }
35     public int hashCode() {
36         return id1.hashCode();
37     }
38
39 }
40
Popular Tags