package DS service import DS DAO EmployeeDAO import DS Entity Employee

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
package DS.service;
import DS.DAO.EmployeeDAO;
import DS.Entity.Employee;
import java.util.Date;
import java.util.List;
import javax.ejb.Stateless;
@Stateless
public class EmployeeService{
private EmployeeDAO employeeDAO;
public EmployeeService() {
employeeDAO = new EmployeeDAO();
}
public List<Employee> find(String name, String surname, String patronymic, Date dOB) {
try{
List<Employee> employees = employeeDAO.find(name, surname, patronymic, dOB);
return employees;
}
catch(Exception ex){
System.out.println(ex.getMessage());
}
return null;
}
}