lxw
2020-06-18 a6a37debb7b037cbb4ef9a3bb38b48bebd8a9a5e
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
28
29
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.EventdataImpl;
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();
        case 6:return new EventdataImpl();
        default :return null;
        }
    }
}