日期:2014-05-17 浏览次数:20968 次
package zp.bean;
public class Job {
private Integer id;
private String jobname;
private String idate;
private Integer number;
private String location ;
private String decription;
private String requirement ;
private Integer cid ;
public String getJobname() {
return jobname;
}
public void setJobname(String jobname) {
this.jobname = jobname;
}
public String getIdate() {
return idate;
}
public void setIdate(String idate) {
this.idate = idate;
}
public Integer getNumber() {
return number;
}
public void setNumber(Integer number) {
this.number = number;
}
public String getLocation() {
return location;
}
public void setLocation(String location) {
this.location = location;
}
public String getDecription() {
return decription;
}
public void setDecription(String decription) {
this.decription = decription;
}
public String getRequirement() {
return requirement;
}
public void setRequirement(String requirement) {
this.requirement = requirement;
}
public Integer getId() {
return id;
}
public void setId(Integer id) {
this.id = id;
}
public Integer getCid() {
return cid;
}
public void setCid(Integer cid) {
this.cid = cid;
}
}
package zp.dao;
import java.util.List;
import zp.bean.Job;
public abstract class JobDAO extends BaseDAO{
public abstract List<Job> getAllJobs();
public abstract Job getJobByID(Integer id);
public abstract int updateJob(Job job);
public abstract int insertJob(Job job) ;
public abstract int deleteJobByID(Integer id);
}
public class JobDAOImpl extends JobDAO {
private PreparedStatement pstm;
/**
* 根据ID获取JOB详细
*/
public Job getJobByID(Integer id) {
Job job = null ;
try {
pstm = this.getConn()
.prepareStatement("select * from job where id = ? ");
Map<Object,Object> paramsMap = new LinkedHashMap<Object