package com.sunmi.sunmit2demo.bean;

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.sunmi.sunmit2demo.bean.GvBeans;
import com.sunmi.sunmit2demo.bean.blescan.BraceletUserBean;
import com.sunmi.sunmit2demo.bean.blescan.FilterMacBean;

import com.sunmi.sunmit2demo.bean.GvBeansDao;
import com.sunmi.sunmit2demo.bean.BraceletUserBeanDao;
import com.sunmi.sunmit2demo.bean.FilterMacBeanDao;

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

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

    private final DaoConfig gvBeansDaoConfig;
    private final DaoConfig braceletUserBeanDaoConfig;
    private final DaoConfig filterMacBeanDaoConfig;

    private final GvBeansDao gvBeansDao;
    private final BraceletUserBeanDao braceletUserBeanDao;
    private final FilterMacBeanDao filterMacBeanDao;

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

        gvBeansDaoConfig = daoConfigMap.get(GvBeansDao.class).clone();
        gvBeansDaoConfig.initIdentityScope(type);

        braceletUserBeanDaoConfig = daoConfigMap.get(BraceletUserBeanDao.class).clone();
        braceletUserBeanDaoConfig.initIdentityScope(type);

        filterMacBeanDaoConfig = daoConfigMap.get(FilterMacBeanDao.class).clone();
        filterMacBeanDaoConfig.initIdentityScope(type);

        gvBeansDao = new GvBeansDao(gvBeansDaoConfig, this);
        braceletUserBeanDao = new BraceletUserBeanDao(braceletUserBeanDaoConfig, this);
        filterMacBeanDao = new FilterMacBeanDao(filterMacBeanDaoConfig, this);

        registerDao(GvBeans.class, gvBeansDao);
        registerDao(BraceletUserBean.class, braceletUserBeanDao);
        registerDao(FilterMacBean.class, filterMacBeanDao);
    }
    
    public void clear() {
        gvBeansDaoConfig.clearIdentityScope();
        braceletUserBeanDaoConfig.clearIdentityScope();
        filterMacBeanDaoConfig.clearIdentityScope();
    }

    public GvBeansDao getGvBeansDao() {
        return gvBeansDao;
    }

    public BraceletUserBeanDao getBraceletUserBeanDao() {
        return braceletUserBeanDao;
    }

    public FilterMacBeanDao getFilterMacBeanDao() {
        return filterMacBeanDao;
    }

}
