package cc.smtweb.system.bpm.web.design.db;

import cc.smtweb.framework.core.annotation.SwService;
import cc.smtweb.framework.core.db.vo.ModelCatalog;
import cc.smtweb.framework.core.mvc.service.*;

/**
 * Created by Akmm at 2022/3/1 17:00
 * 项目服务类
 */
@SwService
public class ModelCatalogService extends AbstractCompService {
    @Override
    protected AbstractHandler createHandler(String type) {
        switch (type) {
            case TYPE_LOAD:
                return new DefaultLoadHandler<ModelCatalog>(ModelCatalog.ENTITY_NAME);
            case TYPE_SAVE:
                return new DefaultSaveHandler<>(ModelCatalog.ENTITY_NAME);
            case TYPE_DEL:
                return new DefaultDelHandler<>(ModelCatalog.ENTITY_NAME);
            case TYPE_LIST:
                return new DefaultListHandler<>(ModelCatalog.ENTITY_NAME);
            case TYPE_TREE:
                return new ModelCatalogTreeHandler();
        }
        return null;
    }
}
