def _validateAndConvertWorker(self, asAllowNullAttributes, oDb): dErrors = TestGroupMemberData._validateAndConvertWorker(self, asAllowNullAttributes, oDb); if self.ksParam_idTestCase not in dErrors: self.oTestCase = TestCaseDataEx() try: self.oTestCase.initFromDbWithId(oDb, self.idTestCase); except Exception as oXcpt: self.oTestCase = TestCaseDataEx() dErrors[self.ksParam_idTestCase] = str(oXcpt); return dErrors;
def _validateAndConvertWorker(self, asAllowNullAttributes, oDb, enmValidateFor = ModelDataBase.ksValidateFor_Other): dErrors = TestGroupMemberData._validateAndConvertWorker(self, asAllowNullAttributes, oDb, enmValidateFor); if self.ksParam_idTestCase not in dErrors: self.oTestCase = TestCaseDataEx() try: self.oTestCase.initFromDbWithId(oDb, self.idTestCase); except Exception as oXcpt: self.oTestCase = TestCaseDataEx() dErrors[self.ksParam_idTestCase] = str(oXcpt); return dErrors;
def initFromDbRowEx(self, aoRow, oDb, tsNow = None): """ Reinitialize from a SELECT * FROM TestGroupMembers, TestCases row. Will query the necessary additional data from oDb using tsNow. Returns self. Raises exception if no row or database error. """ TestGroupMemberData.initFromDbRow(self, aoRow); self.oTestCase = TestCaseDataEx(); self.oTestCase.initFromDbRowEx(aoRow[TestGroupMemberData.kcDbColumns:], oDb, tsNow); return self;
def _validateAndConvertWorker(self, asAllowNullAttributes, oDb): dErrors = TestGroupMemberData._validateAndConvertWorker( self, asAllowNullAttributes, oDb) if self.ksParam_idTestCase not in dErrors: self.oTestCase = TestCaseDataEx() try: self.oTestCase.initFromDbWithId(oDb, self.idTestCase) except Exception as oXcpt: self.oTestCase = TestCaseDataEx() dErrors[self.ksParam_idTestCase] = str(oXcpt) return dErrors
class TestGroupMemberDataEx(TestGroupMemberData): """Extended representation of a test group member.""" def __init__(self): """Extend parent class""" TestGroupMemberData.__init__(self) self.oTestCase = None # TestCaseDataEx. def initFromDbRowEx(self, aoRow, oDb, tsNow=None): """ Reinitialize from a SELECT * FROM TestGroupMembers, TestCases row. Will query the necessary additional data from oDb using tsNow. Returns self. Raises exception if no row or database error. """ TestGroupMemberData.initFromDbRow(self, aoRow) self.oTestCase = TestCaseDataEx() self.oTestCase.initFromDbRowEx(aoRow[TestGroupMemberData.kcDbColumns:], oDb, tsNow) return self def initFromParams(self, oDisp, fStrict=True): self.oTestCase = None return TestGroupMemberData.initFromParams(self, oDisp, fStrict) def getDataAttributes(self): asAttributes = TestGroupMemberData.getDataAttributes(self) asAttributes.remove('oTestCase') return asAttributes def _validateAndConvertWorker( self, asAllowNullAttributes, oDb, enmValidateFor=ModelDataBase.ksValidateFor_Other): dErrors = TestGroupMemberData._validateAndConvertWorker( self, asAllowNullAttributes, oDb, enmValidateFor) if self.ksParam_idTestCase not in dErrors: self.oTestCase = TestCaseDataEx() try: self.oTestCase.initFromDbWithId(oDb, self.idTestCase) except Exception as oXcpt: self.oTestCase = TestCaseDataEx() dErrors[self.ksParam_idTestCase] = str(oXcpt) return dErrors
def initFromDbRowEx(self, aoRow, oDb, tsNow = None): """ Reinitialize from a SELECT * FROM TestGroupMembers, TestCases row. Will query the necessary additional data from oDb using tsNow. Returns self. Raises exception if no row or database error. """ TestGroupMemberData.initFromDbRow(self, aoRow); self.oTestCase = TestCaseDataEx(); self.oTestCase.initFromDbRowEx(aoRow[7:], oDb, tsNow); return self;
class TestGroupMemberDataEx(TestGroupMemberData): """Extended representation of a test group member.""" def __init__(self): """Extend parent class""" TestGroupMemberData.__init__(self) self.oTestCase = None; # TestCaseDataEx. def initFromDbRowEx(self, aoRow, oDb, tsNow = None): """ Reinitialize from a SELECT * FROM TestGroupMembers, TestCases row. Will query the necessary additional data from oDb using tsNow. Returns self. Raises exception if no row or database error. """ TestGroupMemberData.initFromDbRow(self, aoRow); self.oTestCase = TestCaseDataEx(); self.oTestCase.initFromDbRowEx(aoRow[7:], oDb, tsNow); return self; def initFromParams(self, oDisp, fStrict = True): self.oTestCase = None; return TestGroupMemberData.initFromParams(self, oDisp, fStrict); def getDataAttributes(self): asAttributes = TestGroupMemberData.getDataAttributes(self); asAttributes.remove('oTestCase'); return asAttributes; def _validateAndConvertWorker(self, asAllowNullAttributes, oDb): dErrors = TestGroupMemberData._validateAndConvertWorker(self, asAllowNullAttributes, oDb); if self.ksParam_idTestCase not in dErrors: self.oTestCase = TestCaseDataEx() try: self.oTestCase.initFromDbWithId(oDb, self.idTestCase); except Exception as oXcpt: self.oTestCase = TestCaseDataEx() dErrors[self.ksParam_idTestCase] = str(oXcpt); return dErrors;