whyclj
2020-05-29 1590265d662e887dbd135feb26efd06e3b82c97f
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
package com.fgkj.dao;
 
import com.fgkj.dao.impl.Dev_stateImpl;
import com.fgkj.dao.impl.Devdata_rtImpl;
import com.fgkj.dao.impl.Device_infImpl;
import com.fgkj.dao.impl.Eventdata_infImpl;
import com.fgkj.dao.impl.HistorydataImpl;
 
 
public class BaseDAOFactory {    
    
    /**
     * 获取指定实现类的对象
     * @param DAOcode
     * @return
     */
    public static BaseDAO getBaseDAO(int DAOcode){
        switch(DAOcode){
        case 1:return new Device_infImpl();
        case 2:return new HistorydataImpl();
        case 3:return new Devdata_rtImpl();
        case 4:return new Dev_stateImpl();
        case 5:return new Eventdata_infImpl();
            default :return null;
        }
    }
}