예제 #1
0
 def setIcon(self, personId, metaDataId):
     '''
     @see: IPersonIconService.setIcon
     '''
     entityDb = PersonIconMapped()
     entityDb.Id, entityDb.MetaData = personId, metaDataId
     try:
         self.session().merge(entityDb)
         self.session().flush((entityDb,))
     except SQLAlchemyError as e: handle(e, entityDb)
     return entityDb.Id
예제 #2
0
 def setIcon(self, personId, metaDataId, update):
     '''
     @see: IPersonIconService.setIcon
     '''
  
     if update:   
         user = User()
         user.Id = personId
         self.userService.update(user)
     
     entityDb = PersonIconMapped()
     entityDb.Id, entityDb.MetaData = personId, metaDataId
     
     try:
         self.session().merge(entityDb)
         self.session().flush((entityDb,))
     except SQLAlchemyError as e: handle(e, entityDb)
     return entityDb.Id