?? emp.java
字號(hào):
package com;
import java.io.Serializable;
import org.apache.commons.lang.builder.EqualsBuilder;
import org.apache.commons.lang.builder.HashCodeBuilder;
import org.apache.commons.lang.builder.ToStringBuilder;
/** @author Hibernate CodeGenerator */
public class Emp implements Serializable {
/** identifier field */
private Integer id;
/** persistent field */
private int empno;
/** persistent field */
private String ename;
/** persistent field */
private com.Dept dept;
/** full constructor */
public Emp(Integer id, int empno, String ename, com.Dept dept) {
this.id = id;
this.empno = empno;
this.ename = ename;
this.dept = dept;
}
/** default constructor */
public Emp() {
}
public Integer getId() {
return this.id;
}
public void setId(Integer id) {
this.id = id;
}
public int getEmpno() {
return this.empno;
}
public void setEmpno(int empno) {
this.empno = empno;
}
public String getEname() {
return this.ename;
}
public void setEname(String ename) {
this.ename = ename;
}
public com.Dept getDept() {
return this.dept;
}
public void setDept(com.Dept dept) {
this.dept = dept;
}
public String toString() {
return new ToStringBuilder(this)
.append("id", getId())
.toString();
}
public boolean equals(Object other) {
if ( !(other instanceof Emp) ) return false;
Emp castOther = (Emp) other;
return new EqualsBuilder()
.append(this.getId(), castOther.getId())
.isEquals();
}
public int hashCode() {
return new HashCodeBuilder()
.append(getId())
.toHashCode();
}
}
?? 快捷鍵說(shuō)明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -