package com.oo.eye.gen;

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.oo.eye.bean.EyeChartsBean;
import com.oo.eye.bean.EyeHistroyBean;

import com.oo.eye.gen.EyeChartsBeanDao;
import com.oo.eye.gen.EyeHistroyBeanDao;

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

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

    private final DaoConfig eyeChartsBeanDaoConfig;
    private final DaoConfig eyeHistroyBeanDaoConfig;

    private final EyeChartsBeanDao eyeChartsBeanDao;
    private final EyeHistroyBeanDao eyeHistroyBeanDao;

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

        eyeChartsBeanDaoConfig = daoConfigMap.get(EyeChartsBeanDao.class).clone();
        eyeChartsBeanDaoConfig.initIdentityScope(type);

        eyeHistroyBeanDaoConfig = daoConfigMap.get(EyeHistroyBeanDao.class).clone();
        eyeHistroyBeanDaoConfig.initIdentityScope(type);

        eyeChartsBeanDao = new EyeChartsBeanDao(eyeChartsBeanDaoConfig, this);
        eyeHistroyBeanDao = new EyeHistroyBeanDao(eyeHistroyBeanDaoConfig, this);

        registerDao(EyeChartsBean.class, eyeChartsBeanDao);
        registerDao(EyeHistroyBean.class, eyeHistroyBeanDao);
    }
    
    public void clear() {
        eyeChartsBeanDaoConfig.clearIdentityScope();
        eyeHistroyBeanDaoConfig.clearIdentityScope();
    }

    public EyeChartsBeanDao getEyeChartsBeanDao() {
        return eyeChartsBeanDao;
    }

    public EyeHistroyBeanDao getEyeHistroyBeanDao() {
        return eyeHistroyBeanDao;
    }

}
