KickJava   Java API By Example, From Geeks To Geeks.

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


1 //$Id: MoreStuff.java,v 1.1 2004/09/26 05:18:25 oneovthafew Exp $
2
package org.hibernate.test.legacy;
3
4 import java.io.Serializable JavaDoc;
5 import java.util.Collection JavaDoc;
6
7
8 public class MoreStuff implements Serializable JavaDoc {
9     private String JavaDoc stringId;
10     private int intId;
11     private Collection JavaDoc stuffs;
12     private String JavaDoc name;
13     
14     public boolean equals(Object JavaDoc other) {
15         return ( (MoreStuff) other ).getIntId()==intId && ( (MoreStuff) other ).getStringId().equals(stringId);
16     }
17     
18     public int hashCode() {
19         return stringId.hashCode();
20     }
21     
22     /**
23      * Returns the stuffs.
24      * @return Collection
25      */

26     public Collection JavaDoc getStuffs() {
27         return stuffs;
28     }
29     
30     /**
31      * Sets the stuffs.
32      * @param stuffs The stuffs to set
33      */

34     public void setStuffs(Collection JavaDoc stuffs) {
35         this.stuffs = stuffs;
36     }
37     
38     /**
39      * Returns the name.
40      * @return String
41      */

42     public String JavaDoc getName() {
43         return name;
44     }
45     
46     /**
47      * Sets the name.
48      * @param name The name to set
49      */

50     public void setName(String JavaDoc name) {
51         this.name = name;
52     }
53     
54     /**
55      * Returns the intId.
56      * @return int
57      */

58     public int getIntId() {
59         return intId;
60     }
61     
62     /**
63      * Returns the stringId.
64      * @return String
65      */

66     public String JavaDoc getStringId() {
67         return stringId;
68     }
69     
70     /**
71      * Sets the intId.
72      * @param intId The intId to set
73      */

74     public void setIntId(int intId) {
75         this.intId = intId;
76     }
77     
78     /**
79      * Sets the stringId.
80      * @param stringId The stringId to set
81      */

82     public void setStringId(String JavaDoc stringId) {
83         this.stringId = stringId;
84     }
85     
86 }
87
88
89
90
91
92
93
Popular Tags