);
return query.asList();
}
public List<Employee> findEmployee(String name){
DAOEmployee daoEmployee = DAOEmployee.getInstance();
Query<Employee> query = daoEmployee.getDs().createQuery(Employee.class);
query.or(
query.criteria("firstname").equal(Pattern.compile(name, Pattern.CASE_INSENSITIVE)),
query.criteria("lastname").equal(Pattern.compile(name, Pattern.CASE_INSENSITIVE))
);
return query.asList();