package org.dbunitng.sample.dao;

import java.sql.SQLException;
import java.util.List;

import org.dbunitng.sample.entity.Emp;
import org.dbunitng.sample.sql.SqlMapClientManager;

import com.ibatis.sqlmap.client.SqlMapClient;

public class EmpDao {

	@SuppressWarnings("unchecked")
	public List<Emp> listAllEmployee() {
		SqlMapClient client = SqlMapClientManager.getSqlMapClient();

		try {
			return (List<Emp>) client.queryForList("getEmpList");
		} catch (SQLException e) {
			throw new RuntimeException("SQL関連の例外が発生しました", e);
		}

	}

}
