using irisDataBase.Service.mysqlImpl;
using irisHelper;
using System;

namespace irisDataBase
{
    public class IrisDataBaseObject
    {
        static String sqlType = ConfigHelper.GetAppConfig("sqlType");

        public static Object getEntity(String implType)
        {
            Object obj = new object();
            switch (implType)
            {
                case "IrisDataService":
                    /*obj = sqlType == "1"
                        ? (Object)new IrisDataService_MysqlImpl()
                        : (Object)new IrisDataService_SqliteImpl();*/
                    obj = (Object)new IrisDataServiceImpl();
                    break;
                case "IrisPersonView":
                    /*obj = sqlType == "1"
                        ? (Object)new IrisPersonViewService_MysqlImpl()
                        : (Object)new IrisPersonViewService_SqliteImpl();*/
                    obj = (Object)new IrisPersonViewServiceImpl();
                    break;
                case "IrisRecords":
                    /*obj = sqlType == "1"
                        ? (Object)new IrisRecordsServiceImpl_MysqlImpl()
                        : (Object)new IrisRecordsServiceImpl_SqliteImpl();*/
                    obj = (Object)new IrisRecordsServiceImpl();
                    break;
                case "IrisSynchData":
                    obj = (Object)new IrisSynchDataServiceImpl();
                    break;
                case "IrisPermision":
                    obj = (Object)new IrisPermisionServiceImpl();
                    break;
                case "IrisDevice":
                    obj = (Object)new IrisDeviceServiceImpl();
                    break;
                default:
                    break;
            }

            return obj;
        }


    }
}