package org.greenrobot.greendao.unittest;

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 org.greenrobot.greendao.unittest.MinimalEntity;

import org.greenrobot.greendao.unittest.MinimalEntityDao;

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

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

    private final DaoConfig minimalEntityDaoConfig;

    private final MinimalEntityDao minimalEntityDao;

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

        minimalEntityDaoConfig = daoConfigMap.get(MinimalEntityDao.class).clone();
        minimalEntityDaoConfig.initIdentityScope(type);

        minimalEntityDao = new MinimalEntityDao(minimalEntityDaoConfig, this);

        registerDao(MinimalEntity.class, minimalEntityDao);
    }
    
    public void clear() {
        minimalEntityDaoConfig.clearIdentityScope();
    }

    public MinimalEntityDao getMinimalEntityDao() {
        return minimalEntityDao;
    }

}
