Пример #1
0
 def _validateAndConvertWorker(self, asAllowNullAttributes, oDb):
     dErrors = SchedGroupMemberData._validateAndConvertWorker(self, asAllowNullAttributes, oDb);
     if self.ksParam_idTestGroup not in dErrors:
         self.oTestGroup = TestGroupData();
         try:
             self.oTestGroup.initFromDbWithId(oDb, self.idTestGroup);
         except Exception as oXcpt:
             self.oTestGroup = TestGroupData()
             dErrors[self.ksParam_idTestGroup] = str(oXcpt);
     return dErrors;
Пример #2
0
 def _validateAndConvertWorker(self, asAllowNullAttributes, oDb, enmValidateFor = ModelDataBase.ksValidateFor_Other):
     dErrors = SchedGroupMemberData._validateAndConvertWorker(self, asAllowNullAttributes, oDb, enmValidateFor);
     if self.ksParam_idTestGroup not in dErrors:
         self.oTestGroup = TestGroupData();
         try:
             self.oTestGroup.initFromDbWithId(oDb, self.idTestGroup);
         except Exception as oXcpt:
             self.oTestGroup = TestGroupData()
             dErrors[self.ksParam_idTestGroup] = str(oXcpt);
     return dErrors;
Пример #3
0
 def _validateAndConvertWorker(self, asAllowNullAttributes, oDb):
     dErrors = SchedGroupMemberData._validateAndConvertWorker(
         self, asAllowNullAttributes, oDb)
     if self.ksParam_idTestGroup not in dErrors:
         self.oTestGroup = TestGroupData()
         try:
             self.oTestGroup.initFromDbWithId(oDb, self.idTestGroup)
         except Exception as oXcpt:
             self.oTestGroup = TestGroupData()
             dErrors[self.ksParam_idTestGroup] = str(oXcpt)
     return dErrors
Пример #4
0
    def initFromDbRow(self, aoRow):
        """
        Re-initializes the data with a row from a query like this:

            SELECT  SchedGroupMembers.*, TestGroups.*
            FROM    SchedGroupMembers
            JOIN    TestGroups
                ON  (SchedGroupMembers.idTestGroup = TestGroups.idTestGroup);

        Returns self. Raises exception if the row is None or otherwise invalid.
        """
        SchedGroupMemberData.initFromDbRow(self, aoRow);
        self.oTestGroup = TestGroupData().initFromDbRow(aoRow[SchedGroupMemberData.kcDbColumns:]);
        return self;
Пример #5
0
class SchedGroupMemberDataEx(SchedGroupMemberData):
    """
    Extended SchedGroupMember data class.
    This adds the testgroups.
    """
    def __init__(self):
        SchedGroupMemberData.__init__(self)
        self.oTestGroup = None

    def initFromDbRow(self, aoRow):
        """
        Re-initializes the data with a row from a query like this:

            SELECT  SchedGroupMembers.*, TestGroups.*
            FROM    SchedGroupMembers
            JOIN    TestGroups
                ON  (SchedGroupMembers.idTestGroup = TestGroups.idTestGroup);

        Returns self. Raises exception if the row is None or otherwise invalid.
        """
        SchedGroupMemberData.initFromDbRow(self, aoRow)
        self.oTestGroup = TestGroupData().initFromDbRow(
            aoRow[SchedGroupMemberData.kcDbColumns:])
        return self

    def getDataAttributes(self):
        asAttributes = SchedGroupMemberData.getDataAttributes(self)
        asAttributes.remove('oTestGroup')
        return asAttributes

    def _validateAndConvertWorker(
            self,
            asAllowNullAttributes,
            oDb,
            enmValidateFor=ModelDataBase.ksValidateFor_Other):
        dErrors = SchedGroupMemberData._validateAndConvertWorker(
            self, asAllowNullAttributes, oDb, enmValidateFor)
        if self.ksParam_idTestGroup not in dErrors:
            self.oTestGroup = TestGroupData()
            try:
                self.oTestGroup.initFromDbWithId(oDb, self.idTestGroup)
            except Exception as oXcpt:
                self.oTestGroup = TestGroupData()
                dErrors[self.ksParam_idTestGroup] = str(oXcpt)
        return dErrors
Пример #6
0
class SchedGroupMemberDataEx(SchedGroupMemberData):
    """
    Extended SchedGroupMember data class.
    This adds the testgroups.
    """

    def __init__(self):
        SchedGroupMemberData.__init__(self);
        self.oTestGroup = None;

    def initFromDbRow(self, aoRow):
        """
        Re-initializes the data with a row from a query like this:

            SELECT  SchedGroupMembers.*, TestGroups.*
            FROM    SchedGroupMembers
            JOIN    TestGroups
                ON  (SchedGroupMembers.idTestGroup = TestGroups.idTestGroup);

        Returns self. Raises exception if the row is None or otherwise invalid.
        """
        SchedGroupMemberData.initFromDbRow(self, aoRow);
        self.oTestGroup = TestGroupData().initFromDbRow(aoRow[8:]);
        return self;

    def getDataAttributes(self):
        asAttributes = SchedGroupMemberData.getDataAttributes(self);
        asAttributes.remove('oTestGroup');
        return asAttributes;

    def _validateAndConvertWorker(self, asAllowNullAttributes, oDb):
        dErrors = SchedGroupMemberData._validateAndConvertWorker(self, asAllowNullAttributes, oDb);
        if self.ksParam_idTestGroup not in dErrors:
            self.oTestGroup = TestGroupData();
            try:
                self.oTestGroup.initFromDbWithId(oDb, self.idTestGroup);
            except Exception as oXcpt:
                self.oTestGroup = TestGroupData()
                dErrors[self.ksParam_idTestGroup] = str(oXcpt);
        return dErrors;
Пример #7
0
    def initFromDbRow(self, aoRow):
        """
        Re-initializes the data with a row from a query like this:

            SELECT  SchedGroupMembers.*, TestGroups.*
            FROM    SchedGroupMembers
            JOIN    TestGroups
                ON  (SchedGroupMembers.idTestGroup = TestGroups.idTestGroup);

        Returns self. Raises exception if the row is None or otherwise invalid.
        """
        SchedGroupMemberData.initFromDbRow(self, aoRow);
        self.oTestGroup = TestGroupData().initFromDbRow(aoRow[8:]);
        return self;