def _getUser(self, user_id):
     user = User()
     user.fillById(user_id)
     if not user.id:
         raise ApplicationException('User not found for id ' + str(user_id))
     return user
 def createUser(self, new_user_dict):
     user = User( new_user_dict )
     user.save()
     return user.id