KickJava   Java API By Example, From Geeks To Geeks.

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


1 //$Id: Category.java,v 1.4 2005/02/12 07:27:27 steveebersole Exp $
2
package org.hibernate.test.legacy;
3
4 import java.util.ArrayList JavaDoc;
5 import java.util.List JavaDoc;
6
7 /**
8  *
9  */

10 public class Category {
11     
12     public static final String JavaDoc ROOT_CATEGORY = "/";
13     public static final int ROOT_ID = 42;
14
15     private long id;
16     private String JavaDoc name;
17     private List JavaDoc subcategories = new ArrayList JavaDoc();
18     private Assignable assignable;
19     /**
20      * Returns the id.
21      * @return long
22      */

23     public long getId() {
24         return id;
25     }
26     
27     /**
28      * Sets the id.
29      * @param id The id to set
30      */

31     public void setId(long id) {
32         this.id = id;
33     }
34     
35     /**
36      * Returns the subcategories.
37      * @return List
38      */

39     public List JavaDoc getSubcategories() {
40         return subcategories;
41     }
42     
43     /**
44      * Sets the subcategories.
45      * @param subcategories The subcategories to set
46      */

47     public void setSubcategories(List JavaDoc subcategories) {
48         this.subcategories = subcategories;
49     }
50     
51     /**
52      * Returns the name.
53      * @return String
54      */

55     public String JavaDoc getName() {
56         return name;
57     }
58     
59     /**
60      * Sets the name.
61      * @param name The name to set
62      */

63     public void setName(String JavaDoc name) {
64         this.name = name;
65     }
66     
67     public Assignable getAssignable() {
68         return assignable;
69     }
70
71     public void setAssignable(Assignable assignable) {
72         this.assignable = assignable;
73     }
74     
75     public String JavaDoc toString() {
76         return id + ":" + name;
77     }
78
79 }
80
81
82
83
84
85
86
Popular Tags