KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > hibernate > test > annotations > inheritance > joined > Folder


1 //$Id: Folder.java,v 1.2 2005/06/12 20:50:47 oneovthafew Exp $
2
package org.hibernate.test.annotations.inheritance.joined;
3
4 import java.util.HashSet JavaDoc;
5 import java.util.Set JavaDoc;
6
7 import javax.persistence.Entity;
8 import javax.persistence.OneToMany;
9
10 /**
11  * @author Emmanuel Bernard
12  */

13 @Entity
14 public class Folder extends File {
15     private Set JavaDoc<File> children = new HashSet JavaDoc<File>();
16     
17     Folder() {}
18     public Folder(String JavaDoc name) {
19         super(name);
20     }
21     
22     @OneToMany(mappedBy="parent")
23     public Set JavaDoc<File> getChildren() {
24         return children;
25     }
26     public void setChildren(Set JavaDoc children) {
27         this.children = children;
28     }
29 }
30
Popular Tags