package com.phlx.anchorcollect.db.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.phlx.anchorcollect.entity.AncestryinfoEntity;
import com.phlx.anchorcollect.entity.BreedingRecordDetailEntity;
import com.phlx.anchorcollect.entity.BreedingRecordEntity;
import com.phlx.anchorcollect.entity.CattleResumeEntity;
import com.phlx.anchorcollect.entity.DictEntity;
import com.phlx.anchorcollect.entity.GenTable;
import com.phlx.anchorcollect.entity.GenTableColumn;
import com.phlx.anchorcollect.entity.ImmuneBatchDetailEntity;
import com.phlx.anchorcollect.entity.ImmuneBatchEntity;
import com.phlx.anchorcollect.entity.MedicalRecordEntity;
import com.phlx.anchorcollect.entity.PerformanceEntity;
import com.phlx.anchorcollect.entity.UserRoleEntity;
import com.phlx.anchorcollect.entity.WeightManEntity;

import com.phlx.anchorcollect.db.gen.AncestryinfoEntityDao;
import com.phlx.anchorcollect.db.gen.BreedingRecordDetailEntityDao;
import com.phlx.anchorcollect.db.gen.BreedingRecordEntityDao;
import com.phlx.anchorcollect.db.gen.CattleResumeEntityDao;
import com.phlx.anchorcollect.db.gen.DictEntityDao;
import com.phlx.anchorcollect.db.gen.GenTableDao;
import com.phlx.anchorcollect.db.gen.GenTableColumnDao;
import com.phlx.anchorcollect.db.gen.ImmuneBatchDetailEntityDao;
import com.phlx.anchorcollect.db.gen.ImmuneBatchEntityDao;
import com.phlx.anchorcollect.db.gen.MedicalRecordEntityDao;
import com.phlx.anchorcollect.db.gen.PerformanceEntityDao;
import com.phlx.anchorcollect.db.gen.UserRoleEntityDao;
import com.phlx.anchorcollect.db.gen.WeightManEntityDao;

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

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

    private final DaoConfig ancestryinfoEntityDaoConfig;
    private final DaoConfig breedingRecordDetailEntityDaoConfig;
    private final DaoConfig breedingRecordEntityDaoConfig;
    private final DaoConfig cattleResumeEntityDaoConfig;
    private final DaoConfig dictEntityDaoConfig;
    private final DaoConfig genTableDaoConfig;
    private final DaoConfig genTableColumnDaoConfig;
    private final DaoConfig immuneBatchDetailEntityDaoConfig;
    private final DaoConfig immuneBatchEntityDaoConfig;
    private final DaoConfig medicalRecordEntityDaoConfig;
    private final DaoConfig performanceEntityDaoConfig;
    private final DaoConfig userRoleEntityDaoConfig;
    private final DaoConfig weightManEntityDaoConfig;

    private final AncestryinfoEntityDao ancestryinfoEntityDao;
    private final BreedingRecordDetailEntityDao breedingRecordDetailEntityDao;
    private final BreedingRecordEntityDao breedingRecordEntityDao;
    private final CattleResumeEntityDao cattleResumeEntityDao;
    private final DictEntityDao dictEntityDao;
    private final GenTableDao genTableDao;
    private final GenTableColumnDao genTableColumnDao;
    private final ImmuneBatchDetailEntityDao immuneBatchDetailEntityDao;
    private final ImmuneBatchEntityDao immuneBatchEntityDao;
    private final MedicalRecordEntityDao medicalRecordEntityDao;
    private final PerformanceEntityDao performanceEntityDao;
    private final UserRoleEntityDao userRoleEntityDao;
    private final WeightManEntityDao weightManEntityDao;

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

        ancestryinfoEntityDaoConfig = daoConfigMap.get(AncestryinfoEntityDao.class).clone();
        ancestryinfoEntityDaoConfig.initIdentityScope(type);

        breedingRecordDetailEntityDaoConfig = daoConfigMap.get(BreedingRecordDetailEntityDao.class).clone();
        breedingRecordDetailEntityDaoConfig.initIdentityScope(type);

        breedingRecordEntityDaoConfig = daoConfigMap.get(BreedingRecordEntityDao.class).clone();
        breedingRecordEntityDaoConfig.initIdentityScope(type);

        cattleResumeEntityDaoConfig = daoConfigMap.get(CattleResumeEntityDao.class).clone();
        cattleResumeEntityDaoConfig.initIdentityScope(type);

        dictEntityDaoConfig = daoConfigMap.get(DictEntityDao.class).clone();
        dictEntityDaoConfig.initIdentityScope(type);

        genTableDaoConfig = daoConfigMap.get(GenTableDao.class).clone();
        genTableDaoConfig.initIdentityScope(type);

        genTableColumnDaoConfig = daoConfigMap.get(GenTableColumnDao.class).clone();
        genTableColumnDaoConfig.initIdentityScope(type);

        immuneBatchDetailEntityDaoConfig = daoConfigMap.get(ImmuneBatchDetailEntityDao.class).clone();
        immuneBatchDetailEntityDaoConfig.initIdentityScope(type);

        immuneBatchEntityDaoConfig = daoConfigMap.get(ImmuneBatchEntityDao.class).clone();
        immuneBatchEntityDaoConfig.initIdentityScope(type);

        medicalRecordEntityDaoConfig = daoConfigMap.get(MedicalRecordEntityDao.class).clone();
        medicalRecordEntityDaoConfig.initIdentityScope(type);

        performanceEntityDaoConfig = daoConfigMap.get(PerformanceEntityDao.class).clone();
        performanceEntityDaoConfig.initIdentityScope(type);

        userRoleEntityDaoConfig = daoConfigMap.get(UserRoleEntityDao.class).clone();
        userRoleEntityDaoConfig.initIdentityScope(type);

        weightManEntityDaoConfig = daoConfigMap.get(WeightManEntityDao.class).clone();
        weightManEntityDaoConfig.initIdentityScope(type);

        ancestryinfoEntityDao = new AncestryinfoEntityDao(ancestryinfoEntityDaoConfig, this);
        breedingRecordDetailEntityDao = new BreedingRecordDetailEntityDao(breedingRecordDetailEntityDaoConfig, this);
        breedingRecordEntityDao = new BreedingRecordEntityDao(breedingRecordEntityDaoConfig, this);
        cattleResumeEntityDao = new CattleResumeEntityDao(cattleResumeEntityDaoConfig, this);
        dictEntityDao = new DictEntityDao(dictEntityDaoConfig, this);
        genTableDao = new GenTableDao(genTableDaoConfig, this);
        genTableColumnDao = new GenTableColumnDao(genTableColumnDaoConfig, this);
        immuneBatchDetailEntityDao = new ImmuneBatchDetailEntityDao(immuneBatchDetailEntityDaoConfig, this);
        immuneBatchEntityDao = new ImmuneBatchEntityDao(immuneBatchEntityDaoConfig, this);
        medicalRecordEntityDao = new MedicalRecordEntityDao(medicalRecordEntityDaoConfig, this);
        performanceEntityDao = new PerformanceEntityDao(performanceEntityDaoConfig, this);
        userRoleEntityDao = new UserRoleEntityDao(userRoleEntityDaoConfig, this);
        weightManEntityDao = new WeightManEntityDao(weightManEntityDaoConfig, this);

        registerDao(AncestryinfoEntity.class, ancestryinfoEntityDao);
        registerDao(BreedingRecordDetailEntity.class, breedingRecordDetailEntityDao);
        registerDao(BreedingRecordEntity.class, breedingRecordEntityDao);
        registerDao(CattleResumeEntity.class, cattleResumeEntityDao);
        registerDao(DictEntity.class, dictEntityDao);
        registerDao(GenTable.class, genTableDao);
        registerDao(GenTableColumn.class, genTableColumnDao);
        registerDao(ImmuneBatchDetailEntity.class, immuneBatchDetailEntityDao);
        registerDao(ImmuneBatchEntity.class, immuneBatchEntityDao);
        registerDao(MedicalRecordEntity.class, medicalRecordEntityDao);
        registerDao(PerformanceEntity.class, performanceEntityDao);
        registerDao(UserRoleEntity.class, userRoleEntityDao);
        registerDao(WeightManEntity.class, weightManEntityDao);
    }
    
    public void clear() {
        ancestryinfoEntityDaoConfig.clearIdentityScope();
        breedingRecordDetailEntityDaoConfig.clearIdentityScope();
        breedingRecordEntityDaoConfig.clearIdentityScope();
        cattleResumeEntityDaoConfig.clearIdentityScope();
        dictEntityDaoConfig.clearIdentityScope();
        genTableDaoConfig.clearIdentityScope();
        genTableColumnDaoConfig.clearIdentityScope();
        immuneBatchDetailEntityDaoConfig.clearIdentityScope();
        immuneBatchEntityDaoConfig.clearIdentityScope();
        medicalRecordEntityDaoConfig.clearIdentityScope();
        performanceEntityDaoConfig.clearIdentityScope();
        userRoleEntityDaoConfig.clearIdentityScope();
        weightManEntityDaoConfig.clearIdentityScope();
    }

    public AncestryinfoEntityDao getAncestryinfoEntityDao() {
        return ancestryinfoEntityDao;
    }

    public BreedingRecordDetailEntityDao getBreedingRecordDetailEntityDao() {
        return breedingRecordDetailEntityDao;
    }

    public BreedingRecordEntityDao getBreedingRecordEntityDao() {
        return breedingRecordEntityDao;
    }

    public CattleResumeEntityDao getCattleResumeEntityDao() {
        return cattleResumeEntityDao;
    }

    public DictEntityDao getDictEntityDao() {
        return dictEntityDao;
    }

    public GenTableDao getGenTableDao() {
        return genTableDao;
    }

    public GenTableColumnDao getGenTableColumnDao() {
        return genTableColumnDao;
    }

    public ImmuneBatchDetailEntityDao getImmuneBatchDetailEntityDao() {
        return immuneBatchDetailEntityDao;
    }

    public ImmuneBatchEntityDao getImmuneBatchEntityDao() {
        return immuneBatchEntityDao;
    }

    public MedicalRecordEntityDao getMedicalRecordEntityDao() {
        return medicalRecordEntityDao;
    }

    public PerformanceEntityDao getPerformanceEntityDao() {
        return performanceEntityDao;
    }

    public UserRoleEntityDao getUserRoleEntityDao() {
        return userRoleEntityDao;
    }

    public WeightManEntityDao getWeightManEntityDao() {
        return weightManEntityDao;
    }

}
