Return Type | Function name | Arguments |
---|---|---|
hzEcode | hdbObjRepos::Fetch | (hdbObject&,unsigned int,) |
Declared in file: hzDatabase.h
Defined in file : hdbObjRepos.cpp
Function Logic:
Function body:
hzEcode hdbObjRepos::Fetch (hdbObject& obj, unsigned int objId) { _hzfunc("hdbObjRepos::Fetch") ; hzChain edo ; hzEcode rc = E_OK ; _hdb_ck_initstate(m_Name, m_eReposInit, HDB_REPOS_OPEN) ; if (obj.Class() != m_pClass) hzexit(E_TYPE, "Repository %s is of class %s. Supplied object is of class %s", *m_Name, Classname(), obj.Classname()) ; obj.Clear() ; if (objId > m_pMain->Count()) return hzerr(E_NOTFOUND, "Beyond Range %u\n", m_pMain->Count()) ; if (m_pMain) { rc = m_pMain->FetchEDO(edo, objId) ; if (rc != E_OK) { threadLog("FetchEDO failed\n") ; return rc ; } rc = obj.ImportEDO(edo) ; if (rc != E_OK) { threadLog("ImportEDO failed\n") ; return rc ; } rc = obj.Integrity() ; if (rc != E_OK) { hzChain err ; chIter ei ; err << "EDO is [ " ; for (ei = edo ; !ei.eof() ; ei++) { err.Printf("%02x ", (uchar) *ei) ; } err << "]\n" ; threadLog(err) ; threadLog("Integrity check failed err=%s\n", Err2Txt(rc)) ; } return rc ; } return rc ; }