package com.sheep.gamegroup.greendao.download;

import java.util.Map;

import org.greenrobot.greendao.AbstractDao;
import org.greenrobot.greendao.AbstractDaoSession;
import org.greenrobot.greendao.database.Database;
import org.greenrobot.greendao.identityscope.IdentityScopeType;
import org.greenrobot.greendao.internal.DaoConfig;

import com.sheep.gamegroup.greendao.download.AppdownloadBean;
import com.sheep.gamegroup.greendao.download.DownLoadInfo;
import com.sheep.gamegroup.greendao.download.ProcessRecord;
import com.sheep.gamegroup.greendao.download.AcceptTaskRecord;
import com.sheep.gamegroup.greendao.download.ScreenShotRecord;

import com.sheep.gamegroup.greendao.download.AppdownloadBeanDao;
import com.sheep.gamegroup.greendao.download.DownLoadInfoDao;
import com.sheep.gamegroup.greendao.download.ProcessRecordDao;
import com.sheep.gamegroup.greendao.download.AcceptTaskRecordDao;
import com.sheep.gamegroup.greendao.download.ScreenShotRecordDao;

// THIS CODE IS GENERATED BY greenDAO, DO NOT EDIT.

/**
 * {@inheritDoc}
 * 
 * @see org.greenrobot.greendao.AbstractDaoSession
 */
public class DaoSession extends AbstractDaoSession {

    private final DaoConfig appdownloadBeanDaoConfig;
    private final DaoConfig downLoadInfoDaoConfig;
    private final DaoConfig processRecordDaoConfig;
    private final DaoConfig acceptTaskRecordDaoConfig;
    private final DaoConfig screenShotRecordDaoConfig;

    private final AppdownloadBeanDao appdownloadBeanDao;
    private final DownLoadInfoDao downLoadInfoDao;
    private final ProcessRecordDao processRecordDao;
    private final AcceptTaskRecordDao acceptTaskRecordDao;
    private final ScreenShotRecordDao screenShotRecordDao;

    public DaoSession(Database db, IdentityScopeType type, Map<Class<? extends AbstractDao<?, ?>>, DaoConfig>
            daoConfigMap) {
        super(db);

        appdownloadBeanDaoConfig = daoConfigMap.get(AppdownloadBeanDao.class).clone();
        appdownloadBeanDaoConfig.initIdentityScope(type);

        downLoadInfoDaoConfig = daoConfigMap.get(DownLoadInfoDao.class).clone();
        downLoadInfoDaoConfig.initIdentityScope(type);

        processRecordDaoConfig = daoConfigMap.get(ProcessRecordDao.class).clone();
        processRecordDaoConfig.initIdentityScope(type);

        acceptTaskRecordDaoConfig = daoConfigMap.get(AcceptTaskRecordDao.class).clone();
        acceptTaskRecordDaoConfig.initIdentityScope(type);

        screenShotRecordDaoConfig = daoConfigMap.get(ScreenShotRecordDao.class).clone();
        screenShotRecordDaoConfig.initIdentityScope(type);

        appdownloadBeanDao = new AppdownloadBeanDao(appdownloadBeanDaoConfig, this);
        downLoadInfoDao = new DownLoadInfoDao(downLoadInfoDaoConfig, this);
        processRecordDao = new ProcessRecordDao(processRecordDaoConfig, this);
        acceptTaskRecordDao = new AcceptTaskRecordDao(acceptTaskRecordDaoConfig, this);
        screenShotRecordDao = new ScreenShotRecordDao(screenShotRecordDaoConfig, this);

        registerDao(AppdownloadBean.class, appdownloadBeanDao);
        registerDao(DownLoadInfo.class, downLoadInfoDao);
        registerDao(ProcessRecord.class, processRecordDao);
        registerDao(AcceptTaskRecord.class, acceptTaskRecordDao);
        registerDao(ScreenShotRecord.class, screenShotRecordDao);
    }
    
    public void clear() {
        appdownloadBeanDaoConfig.clearIdentityScope();
        downLoadInfoDaoConfig.clearIdentityScope();
        processRecordDaoConfig.clearIdentityScope();
        acceptTaskRecordDaoConfig.clearIdentityScope();
        screenShotRecordDaoConfig.clearIdentityScope();
    }

    public AppdownloadBeanDao getAppdownloadBeanDao() {
        return appdownloadBeanDao;
    }

    public DownLoadInfoDao getDownLoadInfoDao() {
        return downLoadInfoDao;
    }

    public ProcessRecordDao getProcessRecordDao() {
        return processRecordDao;
    }

    public AcceptTaskRecordDao getAcceptTaskRecordDao() {
        return acceptTaskRecordDao;
    }

    public ScreenShotRecordDao getScreenShotRecordDao() {
        return screenShotRecordDao;
    }

}
