departmentuserid.java
来自「jsf在线考试系统的实例」· Java 代码 · 共 70 行
JAVA
70 行
package com.jlobo.web.beans;
import org.apache.commons.lang.builder.EqualsBuilder;
import org.apache.commons.lang.builder.HashCodeBuilder;
// default package
/**
* DepartmentUserId generated by MyEclipse - Hibernate Tools
*/
public class DepartmentUserId implements java.io.Serializable {
// Fields
private volatile int hashValue = 0;
private Long id;
private String _class;
// Constructors
/** default constructor */
public DepartmentUserId() {
}
/** minimal constructor */
public DepartmentUserId(Long id, String _class) {
this.id = id;
this._class = _class;
}
// Property accessors
public Long getId() {
return this.id;
}
public void setId(Long id) {
this.id = id;
}
public String get_class() {
return this._class;
}
public void set_class(String _class) {
this._class = _class;
}
public boolean equals(Object obj)
{
if (this == obj) {
return true;
}
if (!(obj instanceof DepartmentUser)) {
return false;
}
DepartmentUserId p = (DepartmentUserId) obj;
return new EqualsBuilder().append(this.id, p.getId()).append(this._class,
p.get_class()).isEquals();
}
/**
* Implementation of the hashCode method conforming to the Bloch pattern with
* the exception of array properties (these are very unlikely primary key types).
* @return int
*/
public int hashCode()
{
return new HashCodeBuilder().append(this.id).append(
this._class).toHashCode();
}
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?