田源
2024-03-07 4b4083fd73dc27ece42f4835483565eef0e4f608
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
30
31
32
package com.vci.client.uif.engine.client.compare.dialog.treenode;
 
import com.vci.client.uif.engine.client.compare.dataloader.BusinessObjectDataLoader;
import com.vci.client.uif.engine.client.compare.dataloader.DataLoader;
import com.vci.client.uif.engine.client.compare.exception.InitializationException;
 
/**
 * TreeNodeObjectFactory工厂类
 * 
 * 根据不同的DataLoader得到对象工厂
 * 
 * @author VCI-STGK006
 *
 */
public class TreeNodeObjectFactoryFactory {
    
    public static TreeNodeObjectFactory getTreeNodeObjectFactory(DataLoader dataloader) {
        if(dataloader == null) {
            throw new IllegalArgumentException("dataloader is null!");
        }
//        if(dataloader instanceof BusinessObjectDataLoader) {
//            return new BusinessTreeNodeObjectFactory(dataloader);
//        } else if(dataloader instanceof ManuGPRDataLoader) {
//            return new BusinessTreeNodeObjectFactory(dataloader);
//        } else if(dataloader instanceof PBOMGPRDataLoader) {
//            return new BusinessTreeNodeObjectFactory(dataloader);
//        } else {
            //return new BusinessTreeNodeObjectFactory(dataloader);
            throw new InitializationException("位置的DataLoader类型,见TreeNodeObjectFactoryFactory类!");
//        }
    }
}