cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync# -*- coding: utf-8 -*-
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync# $Id$
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync"""
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsyncTest Manager - Failure Categories.
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync"""
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync__copyright__ = \
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync"""
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsyncCopyright (C) 2012-2014 Oracle Corporation
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsyncThis file is part of VirtualBox Open Source Edition (OSE), as
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsyncavailable from http://www.virtualbox.org. This file is free software;
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsyncyou can redistribute it and/or modify it under the terms of the GNU
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsyncGeneral Public License (GPL) as published by the Free Software
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsyncFoundation, in version 2 as it comes in the "COPYING" file of the
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsyncVirtualBox OSE distribution. VirtualBox OSE is distributed in the
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsynchope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsyncThe contents of this file may alternatively be used under the terms
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsyncof the Common Development and Distribution License Version 1.0
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync(CDDL) only, as it comes in the "COPYING.CDDL" file of the
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsyncVirtualBox OSE distribution, in which case the provisions of the
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsyncCDDL are applicable instead of those of the GPL.
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsyncYou may elect to license modified versions of this file under the
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsyncterms and conditions of either the GPL or the CDDL or both.
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync"""
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync__version__ = "$Revision$"
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync# Validation Kit imports.
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsyncfrom testmanager.core.base import ModelDataBase, ModelLogicBase, TMExceptionBase
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsyncfrom testmanager.core.failurereason import FailureReasonLogic
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsyncclass FailureCategoryData(ModelDataBase):
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync """
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync Failure Category Data.
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync """
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync ksParam_idFailureCategory = 'FailureCategory_idFailureCategory'
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync ksParam_tsEffective = 'FailureCategory_tsEffective'
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync ksParam_tsExpire = 'FailureCategory_tsExpire'
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync ksParam_uidAuthor = 'FailureCategory_uidAuthor'
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync ksParam_sShort = 'FailureCategory_sShort'
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync ksParam_sFull = 'FailureCategory_sFull'
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync kasAllowNullAttributes = [ 'idFailureCategory', 'tsEffective', 'tsExpire', 'uidAuthor' ]
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync def __init__(self):
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync ModelDataBase.__init__(self);
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync #
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync # Initialize with defaults.
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync # See the database for explanations of each of these fields.
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync #
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync self.idFailureCategory = None
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync self.tsEffective = None
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync self.tsExpire = None
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync self.uidAuthor = None
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync self.sShort = None
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync self.sFull = None
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync def initFromDbRow(self, aoRow):
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync """
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync Re-initializes the data with a row from a SELECT * FROM FailureCategoryes.
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync Returns self. Raises exception if the row is None or otherwise invalid.
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync """
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync if aoRow is None:
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync raise TMExceptionBase('Failure Category not found.');
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync self.idFailureCategory = aoRow[0]
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync self.tsEffective = aoRow[1]
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync self.tsExpire = aoRow[2]
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync self.uidAuthor = aoRow[3]
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync self.sShort = aoRow[4]
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync self.sFull = aoRow[5]
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync return self
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsyncclass FailureCategoryLogic(ModelLogicBase): # pylint: disable=R0903
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync """
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync Failure Category logic.
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync """
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync def fetchForListing(self, iStart, cMaxRows, tsNow):
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync """
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync Fetches Failure Category records.
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync Returns an array (list) of FailureCategoryData items, empty list if none.
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync Raises exception on error.
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync """
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync if tsNow is None:
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync self._oDb.execute('SELECT *\n'
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync 'FROM FailureCategories\n'
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync 'WHERE tsExpire = \'infinity\'::TIMESTAMP\n'
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync 'ORDER BY idFailureCategory ASC\n'
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync 'LIMIT %s OFFSET %s\n'
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync , (cMaxRows, iStart,));
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync else:
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync self._oDb.execute('SELECT *\n'
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync 'FROM FailureCategories\n'
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync 'WHERE tsExpire > %s\n'
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync ' AND tsEffective <= %s\n'
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync 'ORDER BY idFailureCategory ASC\n'
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync 'LIMIT %s OFFSET %s\n'
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync , (tsNow, tsNow, cMaxRows, iStart,));
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync aoRows = []
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync for aoRow in self._oDb.fetchAll():
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync aoRows.append(FailureCategoryData().initFromDbRow(aoRow))
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync return aoRows
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync def getFailureCategoriesForCombo(self, tsEffective = None):
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync """
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync Gets the list of Failure Categories for a combo box.
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync Returns an array of (value [idFailureCategory], drop-down-name [sShort],
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync hover-text [sFull]) tuples.
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync """
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync if tsEffective is None:
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync self._oDb.execute('SELECT idFailureCategory, sShort, sFull\n'
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync 'FROM FailureCategories\n'
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync 'WHERE tsExpire = \'infinity\'::TIMESTAMP\n'
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync 'ORDER BY sShort')
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync else:
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync self._oDb.execute('SELECT idFailureCategory, sShort, sFull\n'
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync 'FROM FailureCategories\n'
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync 'WHERE tsExpire > %s\n'
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync ' AND tsEffective <= %s\n'
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync 'ORDER BY sShort'
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync , (tsEffective, tsEffective))
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync return self._oDb.fetchAll()
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync def getById(self, idFailureCategory):
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync """Get Failure Category data by idFailureCategory"""
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync self._oDb.execute('SELECT *\n'
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync 'FROM FailureCategories\n'
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync 'WHERE tsExpire = \'infinity\'::timestamp\n'
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync ' AND idFailureCategory = %s;', (idFailureCategory,))
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync aRows = self._oDb.fetchAll()
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync if len(aRows) not in (0, 1):
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync raise self._oDb.integrityException(
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync 'Found more than one failure categories with the same credentials. Database structure is corrupted.')
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync try:
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync return FailureCategoryData().initFromDbRow(aRows[0])
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync except IndexError:
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync return None
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync def addEntry(self, oFailureCategoryData, uidAuthor, fCommit=True):
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync """
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync Add Failure Category record
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync """
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync # Check if record with the same sShort fiels is already exists
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync self._oDb.execute('SELECT *\n'
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync 'FROM FailureCategories\n'
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync 'WHERE tsExpire = \'infinity\'::TIMESTAMP\n'
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync ' AND sShort = %s\n',
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync (oFailureCategoryData.sShort,))
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync if len(self._oDb.fetchAll()) != 0:
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync raise Exception('Record already exist')
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync # Add record
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync self._oDb.execute('INSERT INTO FailureCategories (\n'
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync ' uidAuthor, sShort, sFull'
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync ')\n'
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync 'VALUES (%s, %s, %s)',
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync (uidAuthor,
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync oFailureCategoryData.sShort,
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync oFailureCategoryData.sFull))
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync if fCommit:
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync self._oDb.commit()
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync return True
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync def remove(self, uidAuthor, idFailureCategory, fNeedCommit=True):
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync """
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync Historize record
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync """
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync # Historize Failure Reasons records first
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync self._oDb.execute('SELECT idFailureReason\n'
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync 'FROM FailureReasons\n'
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync 'WHERE idFailureCategory = %s\n'
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync ' AND tsExpire = \'infinity\'::TIMESTAMP\n',
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync (idFailureCategory,))
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync for iFailureReasonId in self._oDb.fetchAll():
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync FailureReasonLogic(self._oDb).remove(
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync uidAuthor, iFailureReasonId, fNeedCommit=False)
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync self._oDb.execute('UPDATE FailureCategories\n'
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync 'SET tsExpire = CURRENT_TIMESTAMP,\n'
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync ' uidAuthor = %s\n'
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync 'WHERE idFailureCategory = %s\n'
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync ' AND tsExpire = \'infinity\'::TIMESTAMP\n',
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync (uidAuthor, idFailureCategory))
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync if fNeedCommit:
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync self._oDb.commit()
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync return True
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync def editEntry(self, oFailureCategoryData, uidAuthor, fCommit=True):
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync """Modify database record"""
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync # Check if record exists
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync oFailureCategoryDataOld = self.getById(oFailureCategoryData.idFailureCategory)
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync if oFailureCategoryDataOld is None:
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync raise TMExceptionBase(
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync 'Failure Category (id: %d) does not exist'
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync % oFailureCategoryData.idFailureCategory)
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync # Check if anything has been changed
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync if oFailureCategoryData.isEqual(oFailureCategoryDataOld):
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync return True
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync # Historize record
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync self.remove(
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync uidAuthor, oFailureCategoryData.idFailureCategory, fNeedCommit=False)
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync self._oDb.execute('INSERT INTO FailureCategories (\n'
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync ' idFailureCategory, uidAuthor, sShort, sFull'
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync ')\n'
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync 'VALUES (%s, %s, %s, %s)',
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync (oFailureCategoryData.idFailureCategory,
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync uidAuthor,
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync oFailureCategoryData.sShort,
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync oFailureCategoryData.sFull))
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync if fCommit:
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync self._oDb.commit()
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync return True