package sql.com.yz.db;

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.sxyz.rfid.greendao.model.WmsArea;
import com.sxyz.rfid.greendao.model.WmsInventory;
import com.sxyz.rfid.greendao.model.WmsInventoryResult;
import com.sxyz.rfid.greendao.model.WmsInventoryTask;
import com.sxyz.rfid.greendao.model.WmsInventoryTaskDetail;
import com.sxyz.rfid.greendao.model.WmsLocation;
import com.sxyz.rfid.greendao.model.WmsWarehouse;

import sql.com.yz.db.WmsAreaDao;
import sql.com.yz.db.WmsInventoryDao;
import sql.com.yz.db.WmsInventoryResultDao;
import sql.com.yz.db.WmsInventoryTaskDao;
import sql.com.yz.db.WmsInventoryTaskDetailDao;
import sql.com.yz.db.WmsLocationDao;
import sql.com.yz.db.WmsWarehouseDao;

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

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

    private final DaoConfig wmsAreaDaoConfig;
    private final DaoConfig wmsInventoryDaoConfig;
    private final DaoConfig wmsInventoryResultDaoConfig;
    private final DaoConfig wmsInventoryTaskDaoConfig;
    private final DaoConfig wmsInventoryTaskDetailDaoConfig;
    private final DaoConfig wmsLocationDaoConfig;
    private final DaoConfig wmsWarehouseDaoConfig;

    private final WmsAreaDao wmsAreaDao;
    private final WmsInventoryDao wmsInventoryDao;
    private final WmsInventoryResultDao wmsInventoryResultDao;
    private final WmsInventoryTaskDao wmsInventoryTaskDao;
    private final WmsInventoryTaskDetailDao wmsInventoryTaskDetailDao;
    private final WmsLocationDao wmsLocationDao;
    private final WmsWarehouseDao wmsWarehouseDao;

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

        wmsAreaDaoConfig = daoConfigMap.get(WmsAreaDao.class).clone();
        wmsAreaDaoConfig.initIdentityScope(type);

        wmsInventoryDaoConfig = daoConfigMap.get(WmsInventoryDao.class).clone();
        wmsInventoryDaoConfig.initIdentityScope(type);

        wmsInventoryResultDaoConfig = daoConfigMap.get(WmsInventoryResultDao.class).clone();
        wmsInventoryResultDaoConfig.initIdentityScope(type);

        wmsInventoryTaskDaoConfig = daoConfigMap.get(WmsInventoryTaskDao.class).clone();
        wmsInventoryTaskDaoConfig.initIdentityScope(type);

        wmsInventoryTaskDetailDaoConfig = daoConfigMap.get(WmsInventoryTaskDetailDao.class).clone();
        wmsInventoryTaskDetailDaoConfig.initIdentityScope(type);

        wmsLocationDaoConfig = daoConfigMap.get(WmsLocationDao.class).clone();
        wmsLocationDaoConfig.initIdentityScope(type);

        wmsWarehouseDaoConfig = daoConfigMap.get(WmsWarehouseDao.class).clone();
        wmsWarehouseDaoConfig.initIdentityScope(type);

        wmsAreaDao = new WmsAreaDao(wmsAreaDaoConfig, this);
        wmsInventoryDao = new WmsInventoryDao(wmsInventoryDaoConfig, this);
        wmsInventoryResultDao = new WmsInventoryResultDao(wmsInventoryResultDaoConfig, this);
        wmsInventoryTaskDao = new WmsInventoryTaskDao(wmsInventoryTaskDaoConfig, this);
        wmsInventoryTaskDetailDao = new WmsInventoryTaskDetailDao(wmsInventoryTaskDetailDaoConfig, this);
        wmsLocationDao = new WmsLocationDao(wmsLocationDaoConfig, this);
        wmsWarehouseDao = new WmsWarehouseDao(wmsWarehouseDaoConfig, this);

        registerDao(WmsArea.class, wmsAreaDao);
        registerDao(WmsInventory.class, wmsInventoryDao);
        registerDao(WmsInventoryResult.class, wmsInventoryResultDao);
        registerDao(WmsInventoryTask.class, wmsInventoryTaskDao);
        registerDao(WmsInventoryTaskDetail.class, wmsInventoryTaskDetailDao);
        registerDao(WmsLocation.class, wmsLocationDao);
        registerDao(WmsWarehouse.class, wmsWarehouseDao);
    }
    
    public void clear() {
        wmsAreaDaoConfig.clearIdentityScope();
        wmsInventoryDaoConfig.clearIdentityScope();
        wmsInventoryResultDaoConfig.clearIdentityScope();
        wmsInventoryTaskDaoConfig.clearIdentityScope();
        wmsInventoryTaskDetailDaoConfig.clearIdentityScope();
        wmsLocationDaoConfig.clearIdentityScope();
        wmsWarehouseDaoConfig.clearIdentityScope();
    }

    public WmsAreaDao getWmsAreaDao() {
        return wmsAreaDao;
    }

    public WmsInventoryDao getWmsInventoryDao() {
        return wmsInventoryDao;
    }

    public WmsInventoryResultDao getWmsInventoryResultDao() {
        return wmsInventoryResultDao;
    }

    public WmsInventoryTaskDao getWmsInventoryTaskDao() {
        return wmsInventoryTaskDao;
    }

    public WmsInventoryTaskDetailDao getWmsInventoryTaskDetailDao() {
        return wmsInventoryTaskDetailDao;
    }

    public WmsLocationDao getWmsLocationDao() {
        return wmsLocationDao;
    }

    public WmsWarehouseDao getWmsWarehouseDao() {
        return wmsWarehouseDao;
    }

}
