/** To-one relationship, resolved on first access. */ public Product getProduct() { Long __key = this.productId; if (product__resolvedKey == null || !product__resolvedKey.equals(__key)) { if (daoSession == null) { throw new DaoException("Entity is detached from DAO context"); } ProductDao targetDao = daoSession.getProductDao(); Product productNew = targetDao.load(__key); synchronized (this) { product = productNew; product__resolvedKey = __key; } } return product; }
/** called by internal mechanisms, do not call yourself. */ public void __setDaoSession(DaoSession daoSession) { this.daoSession = daoSession; myDao = daoSession != null ? daoSession.getStoreDao() : null; }