View Javadoc

1   /*
2    *  DISCLAIMER
3    */
4   package org.flowfuse.base.model.user;
5   
6   import org.apache.commons.logging.Log;
7   import org.apache.commons.logging.LogFactory;
8   import org.flowfuse.base.model.BaseObject;
9   
10  import java.util.List;
11  import java.util.ArrayList;
12  import java.io.Serializable;
13  
14  /***
15   * @author <a href="stefan@flowfuse.org">Stefan Kleineikenscheidt</a>,
16   *         Flowfuse.org
17   * @version $Id: Group.java,v 1.2 2005/11/28 21:48:38 skleinei Exp $
18   * @hibernate.class table="FF_GROUP"
19   */
20  public class Group extends BaseObject {
21  
22    /***
23     * RCS ID
24     */
25    public final static String rcsid = "$Id: Group.java,v 1.2 2005/11/28 21:48:38 skleinei Exp $";
26  
27    /***
28     * Logger
29     */
30    protected final Log logger = LogFactory.getLog(this.getClass());
31  
32    Long id = null;
33    String name = new String();
34  
35    /***
36     * @return Returns the id.
37     * @hibernate.id column="GROUP_ID" generator-class="increment"
38     * unsaved-value="null"
39     */
40    public Long getId() {
41      return id;
42    }
43  
44    private void setId(Long id) {
45      this.id = id;
46    }
47  
48    /***
49     * @hibernate.property column="GROUP_NAME" length="20" not-null="true"
50     */
51    public String getName() {
52      return name;
53    }
54  
55    public void setName(String name) {
56      this.name = name;
57    }
58  
59    public boolean equals(Object o) {
60      if (this == o) {
61        return true;
62      }
63      if (!(o instanceof Group)) {
64        return false;
65      }
66  
67      final Group group = (Group) o;
68  
69      if (!name.equals(group.name)) {
70        return false;
71      }
72  
73      return true;
74    }
75  
76    public int hashCode() {
77      return name.hashCode();
78    }
79  
80    public String toString() {
81      return "Group{" +
82              "name='" + name + "'" +
83              "}";
84    }
85  
86  }
87  
88  /* EOF */