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 MCRCATEGLABELPK implements Serializable {
032
033 private static final long serialVersionUID = 339824532678123753L;
034
035 private String id;
036
037 private String clid;
038
039 private String lang;
040
041 public MCRCATEGLABELPK() {
042 }
043
044 public MCRCATEGLABELPK(String id, String clid, String lang) {
045 this.id = id;
046 this.clid = clid;
047 this.lang = lang;
048 }
049
050 /**
051 * @return Returns the clid.
052 */
053 public String getClid() {
054 return clid;
055 }
056
057 /**
058 * @param clid
059 * The clid to set.
060 */
061 public void setClid(String clid) {
062 this.clid = clid;
063 }
064
065 /**
066 * @return Returns the id.
067 */
068 public String getId() {
069 return id;
070 }
071
072 /**
073 * @param id
074 * The id to set.
075 */
076 public void setId(String id) {
077 this.id = id;
078 }
079
080 /**
081 * @return Returns the lang.
082 */
083 public String getLang() {
084 return lang;
085 }
086
087 /**
088 * @param lang
089 * The lang to set.
090 */
091 public void setLang(String lang) {
092 this.lang = lang;
093 }
094
095 public boolean equals(Object other) {
096 if (!(other instanceof MCRCATEGLABELPK)) {
097 return false;
098 }
099
100 MCRCATEGLABELPK castother = (MCRCATEGLABELPK) other;
101
102 return new EqualsBuilder().append(this.getId(), castother.getId()).append(this.getClid(), castother.getClid()).append(this.getLang(), castother.getLang()).isEquals();
103 }
104
105 public int hashCode() {
106 return new HashCodeBuilder().append(getId()).append(getClid()).append(getLang()).toHashCode();
107 }
108 }