package com.hippo.ehviewer.dao;

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.hippo.ehviewer.dao.GalleryTags;
import com.hippo.ehviewer.dao.DownloadInfo;
import com.hippo.ehviewer.dao.DownloadLabel;
import com.hippo.ehviewer.dao.DownloadDirname;
import com.hippo.ehviewer.dao.HistoryInfo;
import com.hippo.ehviewer.dao.QuickSearch;
import com.hippo.ehviewer.dao.BlackList;
import com.hippo.ehviewer.dao.LocalFavoriteInfo;
import com.hippo.ehviewer.dao.BookmarkInfo;
import com.hippo.ehviewer.dao.Filter;

import com.hippo.ehviewer.dao.GalleryTagsDao;
import com.hippo.ehviewer.dao.DownloadsDao;
import com.hippo.ehviewer.dao.DownloadLabelDao;
import com.hippo.ehviewer.dao.DownloadDirnameDao;
import com.hippo.ehviewer.dao.HistoryDao;
import com.hippo.ehviewer.dao.QuickSearchDao;
import com.hippo.ehviewer.dao.BlackListDao;
import com.hippo.ehviewer.dao.LocalFavoritesDao;
import com.hippo.ehviewer.dao.BookmarksBao;
import com.hippo.ehviewer.dao.FilterDao;

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

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

    private final DaoConfig galleryTagsDaoConfig;
    private final DaoConfig downloadsDaoConfig;
    private final DaoConfig downloadLabelDaoConfig;
    private final DaoConfig downloadDirnameDaoConfig;
    private final DaoConfig historyDaoConfig;
    private final DaoConfig quickSearchDaoConfig;
    private final DaoConfig blackListDaoConfig;
    private final DaoConfig localFavoritesDaoConfig;
    private final DaoConfig bookmarksBaoConfig;
    private final DaoConfig filterDaoConfig;

    private final GalleryTagsDao galleryTagsDao;
    private final DownloadsDao downloadsDao;
    private final DownloadLabelDao downloadLabelDao;
    private final DownloadDirnameDao downloadDirnameDao;
    private final HistoryDao historyDao;
    private final QuickSearchDao quickSearchDao;
    private final BlackListDao blackListDao;
    private final LocalFavoritesDao localFavoritesDao;
    private final BookmarksBao bookmarksBao;
    private final FilterDao filterDao;

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

        galleryTagsDaoConfig = daoConfigMap.get(GalleryTagsDao.class).clone();
        galleryTagsDaoConfig.initIdentityScope(type);

        downloadsDaoConfig = daoConfigMap.get(DownloadsDao.class).clone();
        downloadsDaoConfig.initIdentityScope(type);

        downloadLabelDaoConfig = daoConfigMap.get(DownloadLabelDao.class).clone();
        downloadLabelDaoConfig.initIdentityScope(type);

        downloadDirnameDaoConfig = daoConfigMap.get(DownloadDirnameDao.class).clone();
        downloadDirnameDaoConfig.initIdentityScope(type);

        historyDaoConfig = daoConfigMap.get(HistoryDao.class).clone();
        historyDaoConfig.initIdentityScope(type);

        quickSearchDaoConfig = daoConfigMap.get(QuickSearchDao.class).clone();
        quickSearchDaoConfig.initIdentityScope(type);

        blackListDaoConfig = daoConfigMap.get(BlackListDao.class).clone();
        blackListDaoConfig.initIdentityScope(type);

        localFavoritesDaoConfig = daoConfigMap.get(LocalFavoritesDao.class).clone();
        localFavoritesDaoConfig.initIdentityScope(type);

        bookmarksBaoConfig = daoConfigMap.get(BookmarksBao.class).clone();
        bookmarksBaoConfig.initIdentityScope(type);

        filterDaoConfig = daoConfigMap.get(FilterDao.class).clone();
        filterDaoConfig.initIdentityScope(type);

        galleryTagsDao = new GalleryTagsDao(galleryTagsDaoConfig, this);
        downloadsDao = new DownloadsDao(downloadsDaoConfig, this);
        downloadLabelDao = new DownloadLabelDao(downloadLabelDaoConfig, this);
        downloadDirnameDao = new DownloadDirnameDao(downloadDirnameDaoConfig, this);
        historyDao = new HistoryDao(historyDaoConfig, this);
        quickSearchDao = new QuickSearchDao(quickSearchDaoConfig, this);
        blackListDao = new BlackListDao(blackListDaoConfig, this);
        localFavoritesDao = new LocalFavoritesDao(localFavoritesDaoConfig, this);
        bookmarksBao = new BookmarksBao(bookmarksBaoConfig, this);
        filterDao = new FilterDao(filterDaoConfig, this);

        registerDao(GalleryTags.class, galleryTagsDao);
        registerDao(DownloadInfo.class, downloadsDao);
        registerDao(DownloadLabel.class, downloadLabelDao);
        registerDao(DownloadDirname.class, downloadDirnameDao);
        registerDao(HistoryInfo.class, historyDao);
        registerDao(QuickSearch.class, quickSearchDao);
        registerDao(BlackList.class, blackListDao);
        registerDao(LocalFavoriteInfo.class, localFavoritesDao);
        registerDao(BookmarkInfo.class, bookmarksBao);
        registerDao(Filter.class, filterDao);
    }
    
    public void clear() {
        galleryTagsDaoConfig.getIdentityScope().clear();
        downloadsDaoConfig.getIdentityScope().clear();
        downloadLabelDaoConfig.getIdentityScope().clear();
        downloadDirnameDaoConfig.getIdentityScope().clear();
        historyDaoConfig.getIdentityScope().clear();
        quickSearchDaoConfig.getIdentityScope().clear();
        blackListDaoConfig.getIdentityScope().clear();
        localFavoritesDaoConfig.getIdentityScope().clear();
        bookmarksBaoConfig.getIdentityScope().clear();
        filterDaoConfig.getIdentityScope().clear();
    }

    public GalleryTagsDao getGalleryTagsDao() {
        return galleryTagsDao;
    }

    public DownloadsDao getDownloadsDao() {
        return downloadsDao;
    }

    public DownloadLabelDao getDownloadLabelDao() {
        return downloadLabelDao;
    }

    public DownloadDirnameDao getDownloadDirnameDao() {
        return downloadDirnameDao;
    }

    public HistoryDao getHistoryDao() {
        return historyDao;
    }

    public QuickSearchDao getQuickSearchDao() {
        return quickSearchDao;
    }

    public BlackListDao getBlackListDao() {
        return blackListDao;
    }

    public LocalFavoritesDao getLocalFavoritesDao() {
        return localFavoritesDao;
    }

    public BookmarksBao getBookmarksBao() {
        return bookmarksBao;
    }

    public FilterDao getFilterDao() {
        return filterDao;
    }

}
