001 /*
002 *
003 * $Revision: 13085 $ $Date: 2008-02-06 18:27:24 +0100 (Mi, 06 Feb 2008) $
004 *
005 * This file is part of *** M y C o R e ***
006 * See http://www.mycore.de/ for details.
007 *
008 * This program is free software; you can use it, redistribute it
009 * and / or modify it under the terms of the GNU General Public License
010 * (GPL) as published by the Free Software Foundation; either version 2
011 * of the License or (at your option) any later version.
012 *
013 * This program is distributed in the hope that it will be useful, but
014 * WITHOUT ANY WARRANTY; without even the implied warranty of
015 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
016 * GNU General Public License for more details.
017 *
018 * You should have received a copy of the GNU General Public License
019 * along with this program, in a file called gpl.txt or license.txt.
020 * If not, write to the Free Software Foundation Inc.,
021 * 59 Temple Place - Suite 330, Boston, MA 02111-1307 USA
022 */
023
024 package org.mycore.backend.hibernate.tables;
025
026 import java.io.Serializable;
027
028 import org.apache.commons.lang.builder.EqualsBuilder;
029 import org.apache.commons.lang.builder.HashCodeBuilder;
030
031 public class MCRGROUPADMINSPK implements Serializable {
032 private static final long serialVersionUID = -3499227415039938870L;
033
034 private MCRGROUPS gid;
035
036 private MCRUSERS userid;
037
038 private MCRGROUPS groupid;
039
040 public MCRGROUPADMINSPK() {
041 }
042
043 public MCRGROUPADMINSPK(MCRGROUPS gid, MCRUSERS userid, MCRGROUPS groupid) {
044 this.gid = gid;
045 this.userid = userid;
046 this.groupid = groupid;
047 }
048
049 /**
050 * @return Returns the gid.
051 */
052 public MCRGROUPS getGid() {
053 return gid;
054 }
055
056 /**
057 * @param gid
058 * The gid to set.
059 */
060 public void setGid(MCRGROUPS gid) {
061 this.gid = gid;
062 }
063
064 /**
065 * @return Returns the groupid.
066 */
067 public MCRGROUPS getGroupid() {
068 return groupid;
069 }
070
071 /**
072 * @param groupid
073 * The groupid to set.
074 */
075 public void setGroupid(MCRGROUPS groupid) {
076 this.groupid = groupid;
077 }
078
079 /**
080 * @return Returns the userid.
081 */
082 public MCRUSERS getUserid() {
083 return userid;
084 }
085
086 /**
087 * @param userid
088 * The userid to set.
089 */
090 public void setUserid(MCRUSERS userid) {
091 this.userid = userid;
092 }
093
094 public boolean equals(Object other) {
095 if (!(other instanceof MCRGROUPADMINSPK)) {
096 return false;
097 }
098
099 MCRGROUPADMINSPK castother = (MCRGROUPADMINSPK) other;
100
101 return new EqualsBuilder().append(this.getGid(), castother.getGid()).append(this.getUserid(), castother.getUserid()).append(this.getGroupid(), castother.getGroupid()).isEquals();
102 }
103
104 public int hashCode() {
105 return new HashCodeBuilder().append(getGid()).append(getUserid()).append(getGroupid()).toHashCode();
106 }
107 }