⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 emp.java

📁 采用hibernate2.x框架,数据库采用sqlserver2000,封装了hibernage操作工具类
💻 JAVA
字号:
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();
    }

}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -