} // IsExistById

/*
 *      public IsExistByGuidResponse IsExistByGuid(IsExistByGuidRequest request)
 *      {
 *
 *          IsExistByGuidResponse response = new IsExistByGuidResponse();
 *
 *          try
 *          {
 *
 *              if (new UserTokenCap().IsExistByGuid(request.Guid))
 *                  response.Result = new Ac4yProcessResult() { Code = Ac4yProcessResult.SUCCESS };
 *              else
 *                  response.Result = new Ac4yProcessResult() { Code = Ac4yProcessResult.INEFFECTIVE };
 *
 *          }
 *          catch (Exception exception)
 *          {
 *              response.Result = (new Ac4yProcessResult() { Code = Ac4yProcessResult.FAIL, Message = exception.Message, Description = exception.StackTrace });
 *          }
 *
 *          return response;
 *
 *      } // IsExistByGuid
 */
        public UpdateByIdResponse UpdateById(UpdateByIdRequest request)
        {
            UpdateByIdResponse response = new UpdateByIdResponse();

            try
            {
                if (new UserTokenCap().IsExistById(request.Id))
                {
                    UserToken responseUserToken = new UserTokenCap().UpdateById(request.Id, request.UserToken);

                    response.Result = new Ac4yProcessResult()
                    {
                        Code = Ac4yProcessResult.SUCCESS
                    };
                    response.UserToken = responseUserToken;
                }
                else
                {
                    response.Result = new Ac4yProcessResult()
                    {
                        Code = Ac4yProcessResult.FAIL, Message = "Adott id-val nem létezik rekord."
                    };
                }
            }
            catch (Exception exception)
            {
                response.Result = (new Ac4yProcessResult()
                {
                    Code = Ac4yProcessResult.FAIL, Message = exception.Message, Description = exception.StackTrace
                });
            }

            return(response);
        } // UpdateById
        } // UpdateById

/*
 *      public UpdateByGuidResponse UpdateByGuid(UpdateByGuidRequest request)
 *      {
 *
 *          UpdateByGuidResponse response = new UpdateByGuidResponse();
 *
 *          try
 *          {
 *              if (new UserTokenCap().IsExistByGuid(request.Guid)) {
 *
 *                  new UserTokenCap().UpdateByGuid(request.Guid, request.UserToken);
 *
 *                  response.Result = new Ac4yProcessResult() { Code = Ac4yProcessResult.SUCCESS };
 *              }
 *              else
 *              {
 *                  response.Result = new Ac4yProcessResult() { Code = Ac4yProcessResult.FAIL, Message = "Adott id-val nem létezik rekord." };
 *              }
 *
 *          }
 *          catch (Exception exception)
 *          {
 *              response.Result = (new Ac4yProcessResult() { Code = Ac4yProcessResult.FAIL, Message = exception.Message, Description = exception.StackTrace });
 *          }
 *
 *          return response;
 *
 *      } // UpdateByGuid
 */
        public InsertResponse Insert(InsertRequest request)
        {
            InsertResponse response = new InsertResponse();

            try
            {
                UserToken responseUserToken = new UserTokenCap().Insert(request.UserToken);

                response.Result = new Ac4yProcessResult()
                {
                    Code = Ac4yProcessResult.SUCCESS
                };
                response.UserToken = responseUserToken;
            }
            catch (Exception exception)
            {
                response.Result = (new Ac4yProcessResult()
                {
                    Code = Ac4yProcessResult.FAIL, Message = exception.Message, Description = exception.StackTrace
                });
            }

            return(response);
        } // Insert