示例#1
0
 def create(self, indexrecord_domain, current_user):
     """
     Create GxdIndexRecord with an argument object
     """
     self.validate_input(indexrecord_domain)
     
     gxdindex_record = GxdIndexRecord()
     # get the next primary key
     gxdindex_record._index_key = self.gxdindex_dao.get_next_key()
     # set GxdIndexRecord values
     gxdindex_record._refs_key = indexrecord_domain._refs_key
     gxdindex_record._marker_key = indexrecord_domain._marker_key
     gxdindex_record._priority_key = indexrecord_domain._priority_key
     gxdindex_record._conditionalmutants_key = indexrecord_domain._conditionalmutants_key
     gxdindex_record.comments = indexrecord_domain.comments
     gxdindex_record._createdby_key = current_user._user_key
     gxdindex_record._modifiedby_key = current_user._user_key
     
     if indexrecord_domain.indexstages:
         
         # add the GxdIndexStage(s)
         gxdindex_record.indexstages = []
         for indexstage_input in indexrecord_domain.indexstages:
             
             indexstage = GxdIndexStage()
             indexstage._index_key = gxdindex_record._index_key
             indexstage._indexassay_key = indexstage_input._indexassay_key
             indexstage._stageid_key = indexstage_input._stageid_key
             indexstage._createdby_key = current_user._user_key
             indexstage._modifiedby_key = current_user._user_key
             
             gxdindex_record.indexstages.append(indexstage)
     
     self.gxdindex_dao.create(gxdindex_record)
     
     return convert_models(gxdindex_record, IndexRecordDomain)
 def makeIndexRecord(self, _index_key):
     rec = GxdIndexRecord()
     rec._index_key = _index_key
     return rec
示例#3
0
 def makeIndexRecord(self, _index_key):
     rec = GxdIndexRecord()
     rec._index_key = _index_key
     return rec