KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > exoplatform > services > organization > impl > GroupImpl


1 /**
2  * Copyright 2001-2003 The eXo Platform SARL All rights reserved.
3  * Please look at license.txt in info directory for more license detail.
4  **/

5
6 /**
7  * Created by The eXo Platform SARL .
8  * Author : Mestrallet Benjamin
9  * benjmestrallet@users.sourceforge.net
10  * Date: Oct 6, 2003
11  * Time: 5:04:37 PM
12  */

13 package org.exoplatform.services.organization.impl;
14
15 import org.exoplatform.services.organization.Group;
16 /**
17  * @hibernate.class table="EXO_GROUP"
18  */

19 public class GroupImpl implements Group{
20   
21   private String JavaDoc id ;
22   private String JavaDoc parentId ;
23   private String JavaDoc groupName ;
24   private String JavaDoc label ;
25   private String JavaDoc desc ;
26   
27   public GroupImpl() {
28   
29   }
30   
31   public GroupImpl(String JavaDoc name) {
32     groupName = name ;
33   }
34   
35   /**
36    * @hibernate.id generator-class="assigned" unsaved-value="null"
37    ***/

38   public String JavaDoc getId() { return id; }
39   public void setId(String JavaDoc id) { this.id = id; }
40   
41
42   /**
43    * @hibernate.property
44    **/

45   public String JavaDoc getParentId() { return parentId ; }
46   public void setParentId(String JavaDoc parentId) { this.parentId = parentId; }
47   
48   /**
49    * @hibernate.property
50    **/

51   public String JavaDoc getGroupName() { return groupName; }
52   public void setGroupName(String JavaDoc name) { this.groupName = name; }
53
54   /**
55    * @hibernate.property
56    **/

57   public String JavaDoc getLabel() { return label ; }
58   public void setLabel(String JavaDoc s) { label = s ; }
59   
60   /**
61    * @hibernate.property
62    **/

63   public String JavaDoc getDescription() { return desc ; }
64   public void setDescription(String JavaDoc s) { desc = s ; }
65
66   /**
67    * @hibernate.many-to-one class="org.exoplatform.services.organization.impl.GroupImpl"
68    * column="parent" name="parent"
69    */

70   /*
71   public Group getParent() { return parent; }
72   public void setParent(Group parent) { this.parent = parent; }
73   */

74
75   /**
76    * @hibernate.set name="children" cascade="all" lazy="true"
77    * @hibernate.collection-key column="parent"
78    * @hibernate.collection-one-to-many class="org.exoplatform.services.organization.impl.GroupImpl"
79    */

80   /*
81   public Collection getChildren() { return children; }
82   public void setChildren(Collection children) { this.children = children; }
83
84   public void addChild(GroupImpl c) {
85     c.setParent(this);
86     children.add(c);
87   }
88   */

89
90   public String JavaDoc toString() {
91     return "Group[" + id + "|" + groupName + "]";
92   }
93 }
Popular Tags