package com.casic.dcms.greendao;

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.casic.dcms.bean.NoticeBean;
import com.casic.dcms.bean.StreetLightLocalBean;

import com.casic.dcms.greendao.NoticeBeanDao;
import com.casic.dcms.greendao.StreetLightLocalBeanDao;

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

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

    private final DaoConfig noticeBeanDaoConfig;
    private final DaoConfig streetLightLocalBeanDaoConfig;

    private final NoticeBeanDao noticeBeanDao;
    private final StreetLightLocalBeanDao streetLightLocalBeanDao;

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

        noticeBeanDaoConfig = daoConfigMap.get(NoticeBeanDao.class).clone();
        noticeBeanDaoConfig.initIdentityScope(type);

        streetLightLocalBeanDaoConfig = daoConfigMap.get(StreetLightLocalBeanDao.class).clone();
        streetLightLocalBeanDaoConfig.initIdentityScope(type);

        noticeBeanDao = new NoticeBeanDao(noticeBeanDaoConfig, this);
        streetLightLocalBeanDao = new StreetLightLocalBeanDao(streetLightLocalBeanDaoConfig, this);

        registerDao(NoticeBean.class, noticeBeanDao);
        registerDao(StreetLightLocalBean.class, streetLightLocalBeanDao);
    }
    
    public void clear() {
        noticeBeanDaoConfig.clearIdentityScope();
        streetLightLocalBeanDaoConfig.clearIdentityScope();
    }

    public NoticeBeanDao getNoticeBeanDao() {
        return noticeBeanDao;
    }

    public StreetLightLocalBeanDao getStreetLightLocalBeanDao() {
        return streetLightLocalBeanDao;
    }

}
