📄 dept.java
字号:
package com;
import java.io.Serializable;
import java.util.Set;
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 Dept implements Serializable {
/** identifier field */
private Integer deptno;
/** persistent field */
private String dname;
/** persistent field */
private String address;
/** persistent field */
private Set emps;
/** full constructor */
public Dept(Integer deptno, String dname, String address, Set emps) {
this.deptno = deptno;
this.dname = dname;
this.address = address;
this.emps = emps;
}
/** default constructor */
public Dept() {
}
public Integer getDeptno() {
return this.deptno;
}
public void setDeptno(Integer deptno) {
this.deptno = deptno;
}
public String getDname() {
return this.dname;
}
public void setDname(String dname) {
this.dname = dname;
}
public String getAddress() {
return this.address;
}
public void setAddress(String address) {
this.address = address;
}
public Set getEmps() {
return this.emps;
}
public void setEmps(Set emps) {
this.emps = emps;
}
public String toString() {
return new ToStringBuilder(this)
.append("deptno", getDeptno())
.toString();
}
public boolean equals(Object other) {
if ( !(other instanceof Dept) ) return false;
Dept castOther = (Dept) other;
return new EqualsBuilder()
.append(this.getDeptno(), castOther.getDeptno())
.isEquals();
}
public int hashCode() {
return new HashCodeBuilder()
.append(getDeptno())
.toHashCode();
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -