def getTechnologyBundle(self, technologyID, simple=False):
     'Get information related to the technology'
     # Set value
     value = [technologyID]
     # Get technology
     self.cursor1.execute(buildTechnologySQL(where='technol.primarykey=?'), value)
     technology = stripTechnology(self.cursor1.fetchone())
     if simple:
         return technology
     # Get technologyContactBundles
     self.cursor1.execute('SELECT contacts.primarykey FROM contacts INNER JOIN techinv ON contacts.primarykey=techinv.contactsfk WHERE techinv.technolfk=? ORDER BY pi_order', value)
     technologyContactBundles = [self.getContactBundle(x[0]) for x in self.cursor1.fetchall()]
     technology['leadInventor'] = message_format.formatContactName(technologyContactBundles[0][0]) if technologyContactBundles else ''
     # Get technologyRemarks
     technologyRemarks = self.getRemarks('technol', technologyID)
     # Get technologyPayableDetails
     technologyPayableDetails = self.getPayableDetailsForTechnology(technologyID)
     # Get technologyPatentBundles
     self.cursor1.execute('SELECT primarykey FROM patents WHERE technolfk=? ORDER BY patents.filedate', value)
     technologyPatentBundles = [self.getPatentBundle(x[0]) for x in self.cursor1.fetchall()]
     # Get technologyAgreementBundles
     self.cursor1.execute('SELECT agrmnts.primarykey FROM agrmnts INNER JOIN agrtech ON agrmnts.primarykey=agrtech.agrmntsfk WHERE agrtech.technolfk=? ORDER BY agrmnts.agrmntid', value)
     technologyAgreementBundles = [self.getAgreementBundle(x[0]) for x in self.cursor1.fetchall()]
     # Return
     return technology, technologyContactBundles, technologyRemarks, technologyPayableDetails, technologyPatentBundles, technologyAgreementBundles
 def getPatentBundle(self, patentID, simple=False):
     'Get information related to the patent'
     # Set value
     value = [patentID]
     # Get patent
     self.cursor1.execute(buildPatentSQL(where='patents.primarykey=?'), value)
     patent = stripPatent(self.cursor1.fetchone())
     if simple:
         return patent
     # Get patentContactBundles
     self.cursor1.execute('SELECT contacts.primarykey FROM contacts INNER JOIN patinv ON contacts.primarykey=patinv.contactsfk WHERE patinv.patentsfk=? ORDER BY pi_order', value)
     patentContactBundles = [self.getContactBundle(x[0]) for x in self.cursor1.fetchall()]
     patent['leadInventor'] = message_format.formatContactName(patentContactBundles[0][0]) if patentContactBundles else ''
     # Get patentRemarks
     patentRemarks = self.getRemarks('patents', patentID)
     # Get patentPayableDetails
     patentPayableDetails = self.getPayableDetailsForPatent(patentID)
     # Return
     return patent, patentContactBundles, patentRemarks, patentPayableDetails