最全三大框架整合(使用映射)——Emp.java
发布日期:2021-05-14 13:07:23 浏览次数:14 分类:精选文章

本文共 2113 字,大约阅读时间需要 7 分钟。

Emp Entity Class - Java EEA Model

Emp Entity Class - Detailed Structure

package org.entity;
import java.util.Date;
/**
* Emp entity with complete attributes and persistence features
*/
public class Emp implements java.io.Serializable {
// Fields
private Integer empno;
private Dept dept;
private String ename;
private String job;
private Integer mgr;
private Date hiredate;
private Double sal;
private Double comm;
// Constructors
public Emp() { } // Default constructor
public Emp(Integer empno) {
this.empno = empno;
}
public Emp(Integer empno, Dept dept, String ename, String job, Integer mgr,
Date hiredate, Double sal, Double comm) {
this.empno = empno;
this.dept = dept;
this.ename = ename;
this.job = job;
this.mgr = mgr;
this.hiredate = hiredate;
this.sal = sal;
this.comm = comm;
}
// Accessors
public Integer getEmpno() {
return this.empno;
}
public void setEmpno(Integer empno) {
this.empno = empno;
}
public Dept getDept() {
return this.dept;
}
public void setDept(Dept dept) {
this.dept = dept;
}
public String getEname() {
return this.ename;
}
public void setEname(String ename) {
this.ename = ename;
}
public String getJob() {
return this.job;
}
public void setJob(String job) {
this.job = job;
}
public Integer getMgr() {
return this.mgr;
}
public void setMgr(Integer mgr) {
this.mgr = mgr;
}
public Date getHiredate() {
return this.hiredate;
}
public void setHiredate(Date hiredate) {
this.hiredate = hiredate;
}
public Double getSal() {
return this.sal;
}
public void setSal(Double sal) {
this.sal = sal;
}
public Double getComm() {
return this.comm;
}
public void setComm(Double comm) {
this.comm = comm;
}
}
上一篇:最全三大框架整合(使用映射)——Emp.hbm.xml
下一篇:最全三大框架整合(使用映射)——Dept.java

发表评论

最新留言

不错!
[***.144.177.141]2025年04月27日 00时26分38秒