package examples.jsf.action.impl;

import examples.jsf.action.EmployeeConfirmInitAction;
import examples.jsf.dto.EmployeeDto;
import examples.jsf.logic.EmployeeLogic;

public class EmployeeConfirmInitActionImpl implements EmployeeConfirmInitAction {

	private EmployeeLogic employeeLogic;
	
	private int processMode;
	
	private EmployeeDto employeeDto;

	public void setEmployeeLogic(EmployeeLogic employeeLogic) {
		this.employeeLogic = employeeLogic;
	}
	
	public void setProcessMode(int processMode) {
		this.processMode = processMode;
	}
	
	public int getProcessMode() {
		return processMode;
	}
	
	public EmployeeDto getEmployeeDto() {
		return employeeDto;
	}
	
	public void setEmployeeDto(EmployeeDto employeeDto) {
		this.employeeDto = employeeDto;
	}

	public String initialize() {
		String dname = employeeLogic.getDname(employeeDto.getDeptno());
		employeeDto.setDname(dname);
		return null;
	}
	
}