All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.backendless.servercode.ExecutionResult Maven / Gradle / Ivy

The newest version!
package com.backendless.servercode;

import com.backendless.commons.exception.ExceptionWrapper;

public class ExecutionResult
{
  private T result;
  private ExceptionWrapper exception;

  public ExecutionResult()
  {
  }

  public ExecutionResult( T result )
  {
    this.result = result;
  }

  public ExecutionResult( T res, Exception exception )
  {
    this.result = res;
    if( exception != null )
      this.exception = new ExceptionWrapper( exception );
  }

  public ExecutionResult( T result, ExceptionWrapper exception )
  {
    this.result = result;
    this.exception = exception;
  }

  public ExceptionWrapper getException()
  {
    return exception;
  }

  public T getResult()
  {
    return result;
  }

  public void setResult( T result )
  {
    this.result = result;
  }

  public void setException( ExceptionWrapper exception )
  {
    this.exception = exception;
  }

  @Override
  public String toString()
  {
    return "ExecutionResult{" + "exception=" + exception + ", result=" + result + '}';
  }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy