parent
46f84b5185
commit
6414d1ef1f
@ -0,0 +1,12 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<module type="JAVA_MODULE" version="4">
|
||||||
|
<component name="NewModuleRootManager" inherit-compiler-output="true">
|
||||||
|
<exclude-output />
|
||||||
|
<content url="file://$MODULE_DIR$">
|
||||||
|
<sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" />
|
||||||
|
</content>
|
||||||
|
<orderEntry type="inheritedJdk" />
|
||||||
|
<orderEntry type="sourceFolder" forTests="false" />
|
||||||
|
<orderEntry type="library" name="mysql-connector-java-8.0.11 (2)" level="project" />
|
||||||
|
</component>
|
||||||
|
</module>
|
Binary file not shown.
@ -0,0 +1,51 @@
|
|||||||
|
package com.msb.bean;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
|
||||||
|
public class Dept implements Serializable {
|
||||||
|
private Integer deptno;
|
||||||
|
private String dname;
|
||||||
|
private String loc;
|
||||||
|
|
||||||
|
public Dept() {
|
||||||
|
}
|
||||||
|
|
||||||
|
public Dept(Integer deptno, String dname, String loc) {
|
||||||
|
this.deptno = deptno;
|
||||||
|
this.dname = dname;
|
||||||
|
this.loc = loc;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString() {
|
||||||
|
return "Dept{" +
|
||||||
|
"deptno=" + deptno +
|
||||||
|
", dname='" + dname + '\'' +
|
||||||
|
", loc='" + loc + '\'' +
|
||||||
|
'}';
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getDeptno() {
|
||||||
|
return deptno;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDeptno(Integer deptno) {
|
||||||
|
this.deptno = deptno;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getDname() {
|
||||||
|
return dname;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDname(String dname) {
|
||||||
|
this.dname = dname;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getLoc() {
|
||||||
|
return loc;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setLoc(String loc) {
|
||||||
|
this.loc = loc;
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,107 @@
|
|||||||
|
package com.msb.bean;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
public class Emp implements Serializable {
|
||||||
|
private Integer empno;
|
||||||
|
private String ename;
|
||||||
|
private String job;
|
||||||
|
private Integer mgr;
|
||||||
|
private Date hiredate;
|
||||||
|
private Double sal;
|
||||||
|
private Double comm;
|
||||||
|
private Integer deptno;
|
||||||
|
|
||||||
|
public Emp() {
|
||||||
|
}
|
||||||
|
|
||||||
|
public Emp(Integer empno, String ename, String job, Integer mgr, Date hiredate, Double sal, Double comm, Integer deptno) {
|
||||||
|
this.empno = empno;
|
||||||
|
this.ename = ename;
|
||||||
|
this.job = job;
|
||||||
|
this.mgr = mgr;
|
||||||
|
this.hiredate = hiredate;
|
||||||
|
this.sal = sal;
|
||||||
|
this.comm = comm;
|
||||||
|
this.deptno = deptno;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString() {
|
||||||
|
return "Emp{" +
|
||||||
|
"empno=" + empno +
|
||||||
|
", ename='" + ename + '\'' +
|
||||||
|
", job='" + job + '\'' +
|
||||||
|
", mgr=" + mgr +
|
||||||
|
", hiredate=" + hiredate +
|
||||||
|
", sal=" + sal +
|
||||||
|
", comm=" + comm +
|
||||||
|
", deptno=" + deptno +
|
||||||
|
'}';
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getEmpno() {
|
||||||
|
return empno;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setEmpno(Integer empno) {
|
||||||
|
this.empno = empno;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getEname() {
|
||||||
|
return ename;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setEname(String ename) {
|
||||||
|
this.ename = ename;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getJob() {
|
||||||
|
return job;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setJob(String job) {
|
||||||
|
this.job = job;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getMgr() {
|
||||||
|
return mgr;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setMgr(Integer mgr) {
|
||||||
|
this.mgr = mgr;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Date getHiredate() {
|
||||||
|
return hiredate;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setHiredate(Date hiredate) {
|
||||||
|
this.hiredate = hiredate;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Double getSal() {
|
||||||
|
return sal;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setSal(Double sal) {
|
||||||
|
this.sal = sal;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Double getComm() {
|
||||||
|
return comm;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setComm(Double comm) {
|
||||||
|
this.comm = comm;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getDeptno() {
|
||||||
|
return deptno;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDeptno(Integer deptno) {
|
||||||
|
this.deptno = deptno;
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,10 @@
|
|||||||
|
package com.msb.dao;
|
||||||
|
|
||||||
|
import com.msb.bean.Dept;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
public interface DeptDao {
|
||||||
|
public List<Dept> findAll();
|
||||||
|
public int addDept(Dept dept);
|
||||||
|
}
|
@ -0,0 +1,12 @@
|
|||||||
|
package com.msb.dao;
|
||||||
|
|
||||||
|
import com.msb.bean.Emp;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
public interface EmpDao {
|
||||||
|
public List<Emp> findAll();
|
||||||
|
public int deleteByEmpno(int empno);
|
||||||
|
public int updateEmp(Emp emp);
|
||||||
|
public int addEmp(Emp emp);
|
||||||
|
}
|
@ -0,0 +1,18 @@
|
|||||||
|
package com.msb.dao.imp;
|
||||||
|
|
||||||
|
import com.msb.bean.Dept;
|
||||||
|
import com.msb.dao.DeptDao;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
public class DeptDaoImp implements DeptDao {
|
||||||
|
@Override
|
||||||
|
public List<Dept> findAll() {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int addDept(Dept dept) {
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,28 @@
|
|||||||
|
package com.msb.dao.imp;
|
||||||
|
|
||||||
|
import com.msb.bean.Emp;
|
||||||
|
import com.msb.dao.EmpDao;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
public class EmpDaoImp implements EmpDao {
|
||||||
|
@Override
|
||||||
|
public List<Emp> findAll() {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int deleteByEmpno(int empno) {
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int updateEmp(Emp emp) {
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int addEmp(Emp emp) {
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,7 @@
|
|||||||
|
package com.msb.view;
|
||||||
|
|
||||||
|
public class EmpManageSystem {
|
||||||
|
public static void main(String[] args) {
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in new issue