📄 daofactory.java
字号:
/*
* DAOFactory.java
*
* Created on 2007年4月17日, 下午4:36
*
* To change this template, choose Tools | Template Manager
* and open the template in the editor.
*/
package com.ebuy.dataaccess;
import com.ebuy.common.*;
import com.ebuy.common.dao.IDAOFactory;
import com.ebuy.common.dao.IDAO;
/**
*
* @author Administrator
*/
public class DAOFactory implements IDAOFactory
{
public IDAO getDAOInstance(NameProvider name)
{
IDAO dao=null;
switch(name)
{
case Category:
dao=new CategoryDAO();
break;
case Customer:
dao=new CustomerDAO();
break;
case Product:
dao=new ProductDAO();
break;
case Order:
dao=new OrderDAO();
break;
}
return dao;
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -