配置文件
driver=oracle.jdbc.OracleDriver
url=jdbc:oracle:thin:@localhost:1521:XE
username=scott
passwd=123456
实体类
package com.bjsxt.entity;
import java.util.Date;
public class Emp {
public int empno;
public String ename;
public String job;
public int mgr;
public Date hiredate;
public double sal;
public double comm;
public int deptno;
public int getEmpno() {
return empno;
}
public void setEmpno(int 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 int getMgr() {
return mgr;
}
public void setMgr(int 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 int getDeptno() {
return deptno;
}
public void setDeptno(int deptno) {
this.deptno = deptno;
}
@Override
public int hashCode() {
final int prime = 31;
int result = 1;
long temp;
temp = Double.doubleToLongBits(comm);
result = prime * result + (int) (temp ^ (temp >>> 32));
result = prime * result + deptno;
result = prime * result + empno;
result = prime * result + ((ename == null) ? 0 : ename.hashCode());
result = prime * result + ((hiredate == null) ? 0 : hiredate.hashCode());
result = prime * result + ((job == null) ? 0 : job.hashCode());
result = prime * result + mgr;
temp = Double.doubleToLongBits(sal);
result = prime * result + (int) (temp ^ (temp >>> 32));
return result;
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (getClass() != obj.getClass())
return false;
Emp other = (Emp) obj;
if (Double.doubleToLongBits(comm) != Double.doubleToLongBits(other.comm))
return false;
if (deptno != other.deptno)
return false;
if (empno != other.empno)
ret