HP Integrity NonStop J-Series User Manual
Page 286

1.
On the Project Explorer frame, right-click EmpInfo and select New > Interface.
The New Java Interface dialog box appears.
2.
In the Source folder field, enter EmpInfo/src and in the Package field, enter
com.hp.empinfo.service
.
3.
In the Name field, enter IEmployeeDao and click Finish.
shows the New Java Interface dialog box.
Figure 133 New Java Interface Dialog Box
The IEmployeeDao.java file is created.
4.
Modify the IEmployeeDao.java file to declare the methods implemented in the
EmployeeDao.java
file.
After modifications, the IEmployeeDao.java file must appear as shown:
package com.hp.empinfo.service;
import java.sql.SQLException;
import com.hp.empinfo.domain.Employee;
public interface IEmployeeDao {
/**Retrieve employee Details corresponding to provided employeeId**/
public Employee getDetail(int empid) throws SQLException ;
/**Inserting employee Details**/
public void insertDetail(int empid, String firstname, String lastname,
int age, String email) throws SQLException ;
/**Deleting Employee corresponding to given employeeId**/
public String deleteEmployee(int empid) throws SQLException;
/**Checking whether the employee corresponding to provided employeeId already exists in the database**/
public Employee checkEmp(int empid)throws SQLException;
}
286 Integrating Frameworks