?? 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();
}
}
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -