KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > hibernate > test > ops > NumberedNode


1 //$Id: NumberedNode.java,v 1.4 2005/06/20 03:19:34 oneovthafew Exp $
2
package org.hibernate.test.ops;
3
4 import java.util.Date JavaDoc;
5 import java.util.HashSet JavaDoc;
6 import java.util.Set JavaDoc;
7
8 /**
9  * @author Gavin King
10  */

11 public class NumberedNode {
12     
13     private long id;
14     private String JavaDoc name;
15     private NumberedNode parent;
16     private Set JavaDoc children = new HashSet JavaDoc();
17     private String JavaDoc description;
18     private Date JavaDoc created;
19
20     public NumberedNode() {
21         super();
22     }
23
24     public NumberedNode(String JavaDoc name) {
25         this.name = name;
26         created = new Date JavaDoc();
27     }
28
29     public long getId() {
30         return id;
31     }
32     public void setId(long id) {
33         this.id = id;
34     }
35     
36     public Set JavaDoc getChildren() {
37         return children;
38     }
39     public void setChildren(Set JavaDoc children) {
40         this.children = children;
41     }
42     public String JavaDoc getName() {
43         return name;
44     }
45     public void setName(String JavaDoc name) {
46         this.name = name;
47     }
48     public NumberedNode getParent() {
49         return parent;
50     }
51     public void setParent(NumberedNode parent) {
52         this.parent = parent;
53     }
54     
55     public NumberedNode addChild(NumberedNode child) {
56         children.add(child);
57         child.setParent(this);
58         return this;
59     }
60     
61     public String JavaDoc getDescription() {
62         return description;
63     }
64     public void setDescription(String JavaDoc description) {
65         this.description = description;
66     }
67
68     public Date JavaDoc getCreated() {
69         return created;
70     }
71
72     public void setCreated(Date JavaDoc created) {
73         this.created = created;
74     }
75 }
76
Popular Tags