package org.jfox.dao;

import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.SQLException;

import org.jfox.dao.mapping.TableMapping;


/**
 * @author <a href="mailto:yangyong@ufsoft.com.cn">Young Yang</a>
 */

public class EmployeeDAO extends AbstractDAO {

    protected Connection initConnection() throws SQLException {
        DriverManager.registerDriver(new com.mysql.jdbc.Driver());
        return DriverManager.getConnection("jdbc:mysql://localhost/test");
    }

    protected TableMapping initMapping(Class pClass) throws DAOException {
        TableMapping tm = super.initMapping(pClass);
        tm.setColumnAutoEvaluatedWithMutilName("id");
        return tm;
    }

}

