Creating a simple pojo, Developing – HP Integrity NonStop J-Series User Manual

Page 102

Advertising
background image

Figure 28 EmpInfo: Employee Details Screen

Developing Business Logic and Providing the Web Interface

This section describes the following tasks:

1.

“Creating a Simple POJO” (page 102)

2.

“Creating Data Access Object Implementation for JDBC” (page 103)

3.

“Creating and Modifying Supporting Views to Display Business Data” (page 103)

4.

“Adding Dependency JAR Files” (page 105)

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

“Creating the Controller for EmpInfo”

(page 91)

.

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;

102 Getting Started with Spring

Advertising
This manual is related to the following products: