Manual

1. Creating a Simple POJO
2. Creating Data Access Object Implementation for JDBC
3. Creating and Modifying Supporting Views to Display Business Data
4. Adding Dependency JAR Files
Creating a Simple POJO
To create a simple POJO, complete the following steps:
1. Create a com.hp.empinfo.domain package and an Employee class in the
com.hp.empinfo.domain package, as described in the Creating the Controller for EmpInfo
section.
2. Modify the Employee.java class file to add some properties and their getter and setter
methods.
After modification, the Employee.java file must appear as:
package com.hp.empinfo.domain;
public class Employee implements java.io.Serializable {
private int empid;;
private String firstname;
private String lastname;
private int age;
private String email;
public int getEmpid() {
return empid;
}
public void setEmpid(int empid) {
this.empid = empid;
}
public String getFirstname() {
return firstname;
}
public void setFirstname (String firstname) {
this. firstname= firstname;
}
public String getLastname () {
return lastname;
}
public void setLastname (String lastname) {
this. lastname= lastname;
}
public int getAge () {
return age;
}
public void setAge (int age) {
this. age= age;
}
public String getEmail () {
return email;
}
public void setEmail (String email) {
this. email= email;
}
}
Creating Data Access Object Implementation for JDBC
To run the Data Access Object (DAO) implementation for JDBC, complete the following steps:
118 Getting Started with Spring