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.CardEntity;
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.PerformanceEntity;
import com.phlx.anchorcollect.entity.UserRoleEntity;
import com.phlx.anchorcollect.entity.WeightManEntity;
import com.phlx.anchorcollect.entity.ImmuneBatchEntity;
import com.phlx.anchorcollect.entity.MedicalRecordEntity;

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.CardEntityDao;
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.PerformanceEntityDao;
import com.phlx.anchorcollect.db.gen.UserRoleEntityDao;
import com.phlx.anchorcollect.db.gen.WeightManEntityDao;
import com.phlx.anchorcollect.db.gen.ImmuneBatchEntityDao;
import com.phlx.anchorcollect.db.gen.MedicalRecordEntityDao;

// 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 cardEntityDaoConfig;
    private final DaoConfig cattleResumeEntityDaoConfig;
    private final DaoConfig dictEntityDaoConfig;
    private final DaoConfig genTableDaoConfig;
    private final DaoConfig genTableColumnDaoConfig;
    private final DaoConfig performanceEntityDaoConfig;
    private final DaoConfig userRoleEntityDaoConfig;
    private final DaoConfig weightManEntityDaoConfig;
    private final DaoConfig immuneBatchEntityDaoConfig;
    private final DaoConfig medicalRecordEntityDaoConfig;

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

    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);

        cardEntityDaoConfig = daoConfigMap.get(CardEntityDao.class).clone();
        cardEntityDaoConfig.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);

        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);

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

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

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

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

    public AncestryinfoEntityDao getAncestryinfoEntityDao() {
        return ancestryinfoEntityDao;
    }

    public BreedingRecordDetailEntityDao getBreedingRecordDetailEntityDao() {
        return breedingRecordDetailEntityDao;
    }

    public BreedingRecordEntityDao getBreedingRecordEntityDao() {
        return breedingRecordEntityDao;
    }

    public CardEntityDao getCardEntityDao() {
        return cardEntityDao;
    }

    public CattleResumeEntityDao getCattleResumeEntityDao() {
        return cattleResumeEntityDao;
    }

    public DictEntityDao getDictEntityDao() {
        return dictEntityDao;
    }

    public GenTableDao getGenTableDao() {
        return genTableDao;
    }

    public GenTableColumnDao getGenTableColumnDao() {
        return genTableColumnDao;
    }

    public PerformanceEntityDao getPerformanceEntityDao() {
        return performanceEntityDao;
    }

    public UserRoleEntityDao getUserRoleEntityDao() {
        return userRoleEntityDao;
    }

    public WeightManEntityDao getWeightManEntityDao() {
        return weightManEntityDao;
    }

    public ImmuneBatchEntityDao getImmuneBatchEntityDao() {
        return immuneBatchEntityDao;
    }

    public MedicalRecordEntityDao getMedicalRecordEntityDao() {
        return medicalRecordEntityDao;
    }

}
