KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > hibernate > test > onetomany > Parent


1 //$Id: Parent.java,v 1.1 2004/08/19 10:12:11 oneovthafew Exp $
2
package org.hibernate.test.onetomany;
3
4 import java.util.Collection JavaDoc;
5 import java.util.HashSet JavaDoc;
6
7 /**
8  * @author gavin
9  */

10 public class Parent {
11     private Long JavaDoc id;
12     private String JavaDoc name;
13     private Collection JavaDoc children = new HashSet JavaDoc();
14     /**
15      * @return Returns the children.
16      */

17     public Collection JavaDoc getChildren() {
18         return children;
19     }
20     /**
21      * @param children The children to set.
22      */

23     public void setChildren(Collection JavaDoc children) {
24         this.children = children;
25     }
26     /**
27      * @return Returns the id.
28      */

29     public Long JavaDoc getId() {
30         return id;
31     }
32     /**
33      * @param id The id to set.
34      */

35     public void setId(Long JavaDoc id) {
36         this.id = id;
37     }
38     /**
39      * @return Returns the name.
40      */

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

47     public void setName(String JavaDoc name) {
48         this.name = name;
49     }
50 }
51
Popular Tags