/*
* Copyright 2002-2006 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.openuap.cms.user.model;
/**
*
* <p>
* 用户角色ID.
* </p>
*
* <p>
* $Id: UserRoleId.java 3939 2010-10-27 08:41:36Z orangeforjava $
* </p>
*
* @author Joseph
* @version 1.0
*/
public class UserRoleId implements java.io.Serializable {
/**
*
*/
private static final long serialVersionUID = 7833793488657885944L;
private Long userId;
private Long roleId;
public UserRoleId() {
}
public Long getUserId() {
return this.userId;
}
public void setUserId(Long userId) {
this.userId = userId;
}
public Long getRoleId() {
return this.roleId;
}
public void setRoleId(Long roleId) {
this.roleId = roleId;
}
public boolean equals(Object other) {
if ((this == other)) {
return true;
}
if ((other == null)) {
return false;
}
if (!(other instanceof UserRoleId)) {
return false;
}
UserRoleId castOther = (UserRoleId) other;
return ((this.getUserId() == castOther.getUserId()) || (this.getUserId() != null
&& castOther.getUserId() != null && this.getUserId().equals(castOther.getUserId())))
&& ((this.getRoleId() == castOther.getRoleId()) || (this.getRoleId() != null
&& castOther.getRoleId() != null && this.getRoleId().equals(castOther.getRoleId())));
}
public int hashCode() {
int result = 17;
result = 37 * result + (getUserId() == null ? 0 : this.getUserId().hashCode());
result = 37 * result + (getRoleId() == null ? 0 : this.getRoleId().hashCode());
return result;
}
}