KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > javabb > vo > GroupModerator


1 package org.javabb.vo;
2
3 import java.io.Serializable JavaDoc;
4 import org.apache.commons.lang.builder.EqualsBuilder;
5 import org.apache.commons.lang.builder.HashCodeBuilder;
6 import org.apache.commons.lang.builder.ToStringBuilder;
7
8 /*
9  * Copyright 2004 JavaFree.org
10  *
11  * Licensed under the Apache License, Version 2.0 (the "License");
12  * you may not use this file except in compliance with the License.
13  * You may obtain a copy of the License at
14  *
15  * http://www.apache.org/licenses/LICENSE-2.0
16  *
17  * Unless required by applicable law or agreed to in writing, software
18  * distributed under the License is distributed on an "AS IS" BASIS,
19  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
20  * See the License for the specific language governing permissions and
21  * limitations under the License.
22  */

23
24 /**
25  * $Id: GroupModerator.java,v 1.2.8.2 2006/04/17 17:46:57 daltoncamargo Exp $
26  * @author Dalton Camargo - <a HREF="mailto:dalton@javabb.org">dalton@javabb.org </a> <br>
27  */

28 /**
29  * @hibernate.class
30  * table="jbb_group_moderator"
31  *
32 */

33 public class GroupModerator implements Serializable JavaDoc {
34
35     /** identifier field */
36     private org.javabb.vo.GroupModeratorPK comp_id;
37
38     /** nullable persistent field */
39     private org.javabb.vo.Forum forum;
40
41     /** nullable persistent field */
42     private org.javabb.vo.Group group;
43
44     /** full constructor */
45     public GroupModerator(org.javabb.vo.GroupModeratorPK comp_id, org.javabb.vo.Forum forum, org.javabb.vo.Group jbbGroup) {
46         this.comp_id = comp_id;
47         this.forum = forum;
48         this.group = jbbGroup;
49     }
50
51     /** default constructor */
52     public GroupModerator() {
53     }
54
55     /** minimal constructor */
56     public GroupModerator(org.javabb.vo.GroupModeratorPK comp_id) {
57         this.comp_id = comp_id;
58     }
59
60     /**
61      * @hibernate.id
62      * generator-class="assigned"
63      *
64      */

65     public org.javabb.vo.GroupModeratorPK getComp_id() {
66         return this.comp_id;
67     }
68
69     public void setComp_id(org.javabb.vo.GroupModeratorPK comp_id) {
70         this.comp_id = comp_id;
71     }
72
73     /**
74      * @hibernate.many-to-one
75      * update="false"
76      * insert="false"
77      *
78      * @hibernate.column
79      * name="id_forum"
80      *
81      */

82     public org.javabb.vo.Forum getForum() {
83         return this.forum;
84     }
85
86     public void setForum(org.javabb.vo.Forum forum) {
87         this.forum = forum;
88     }
89
90     /**
91      * @hibernate.many-to-one
92      * update="false"
93      * insert="false"
94      *
95      * @hibernate.column
96      * name="group_id"
97      *
98      */

99     public org.javabb.vo.Group getGroup() {
100         return this.group;
101     }
102
103     public void setGroup(org.javabb.vo.Group group) {
104         this.group = group;
105     }
106
107     public String JavaDoc toString() {
108         return new ToStringBuilder(this)
109             .append("comp_id", getComp_id())
110             .toString();
111     }
112
113     public boolean equals(Object JavaDoc other) {
114         if ( !(other instanceof GroupModerator) ) return false;
115         GroupModerator castOther = (GroupModerator) other;
116         return new EqualsBuilder()
117             .append(this.getComp_id(), castOther.getComp_id())
118             .isEquals();
119     }
120
121     public int hashCode() {
122         return new HashCodeBuilder()
123             .append(getComp_id())
124             .toHashCode();
125     }
126
127 }
128
Popular Tags