package com.javahonk.dao;

import java.util.List;
import java.util.Map;

import org.springframework.jdbc.core.support.JdbcDaoSupport;


/**
 * @author javahonk
 *
 */
public class SpringJdbcDaoSupportDAOImpl extends JdbcDaoSupport implements SpringJdbcDaoSupportSDAO {
	
	@Override
	public List<Map<String, Object>> getPersonTable() {
		String sql = "SELECT * FROM person";
		return getJdbcTemplate().queryForList(sql);
	}

	@Override
	public List<Map<String, Object>> getPersonTableByName(String firstName) {
		String sql = "SELECT * FROM person where FirstName = ?";
		return getJdbcTemplate().queryForList(sql,firstName);
	}
	
}
