KickJava   Java API By Example, From Geeks To Geeks.

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


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

10 public class Broken implements Serializable JavaDoc {
11     private Long JavaDoc id;
12     private String JavaDoc otherId;
13     private Date JavaDoc timestamp;
14     public Long JavaDoc getId() {
15         return id;
16     }
17
18     public Date JavaDoc getTimestamp() {
19         return timestamp;
20     }
21
22     public void setId(Long JavaDoc long1) {
23         id = long1;
24     }
25
26     public void setTimestamp(Date JavaDoc date) {
27         timestamp = date;
28     }
29
30     public String JavaDoc getOtherId() {
31         return otherId;
32     }
33
34     public void setOtherId(String JavaDoc string) {
35         otherId = string;
36     }
37     
38     public boolean equals(Object JavaDoc other) {
39         if ( !(other instanceof Broken) ) return false;
40         Broken that = (Broken) other;
41         return this.id.equals(that.id) && this.otherId.equals(that.otherId);
42     }
43     
44     public int hashCode() {
45         return 1;
46     }
47
48 }
49
Popular Tags