KickJava   Java API By Example, From Geeks To Geeks.

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


1 //$Id: Single.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 import java.util.HashSet JavaDoc;
7
8
9 public class Single implements Serializable JavaDoc {
10     private String JavaDoc id;
11     private String JavaDoc prop;
12     private String JavaDoc string;
13     private Collection JavaDoc several = new HashSet JavaDoc();
14     /**
15      * Returns the id.
16      * @return String
17      */

18     public String JavaDoc getId() {
19         return id;
20     }
21     
22     /**
23      * Returns the prop.
24      * @return String
25      */

26     public String JavaDoc getProp() {
27         return prop;
28     }
29     
30     /**
31      * Returns the several.
32      * @return Set
33      */

34     public Collection JavaDoc getSeveral() {
35         return several;
36     }
37     
38     /**
39      * Sets the id.
40      * @param id The id to set
41      */

42     public void setId(String JavaDoc id) {
43         this.id = id;
44     }
45     
46     /**
47      * Sets the prop.
48      * @param prop The prop to set
49      */

50     public void setProp(String JavaDoc prop) {
51         this.prop = prop;
52     }
53     
54     /**
55      * Sets the several.
56      * @param several The several to set
57      */

58     public void setSeveral(Collection JavaDoc several) {
59         this.several = several;
60     }
61     
62     /**
63      * Returns the string.
64      * @return String
65      */

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

74     public void setString(String JavaDoc string) {
75         this.string = string;
76     }
77     
78     /*public boolean equals(Object other) {
79         if ( !(other instanceof Single) ) return false;
80         return ( (Single) other ).id.equals(id) && ( (Single) other ).string.equals(string);
81     }
82     
83     public int hashCode() {
84         return id.hashCode();
85     }*/

86     
87 }
88
89
90
91
92
93
94
Popular Tags