package com.itsol.quantrivanphong.manager.project.projectgroup.common;

import com.itsol.quantrivanphong.model.Employee;
import com.itsol.quantrivanphong.report.issue.common.AbstractEntityManagerDao;
import org.apache.log4j.Logger;
import org.springframework.stereotype.Service;



@Service
public class EmployeeRepositoryImpl extends AbstractEntityManagerDao<Integer, Employee> {
    private Logger logger = Logger.getLogger(EmployeeRepositoryImpl.class);

    public Employee getEmployeeById(Integer employeeId) {
        try {
            Employee employee = findByEmtityId(employeeId);
            if (employee != null) {
                return employee;
            }
        } catch (Exception e) {
            logger.info("( Lỗi tìm employee theo ID: )" + e.getMessage());
        }
        return null;
    }
}
