TResult - the result type of the operationpublic static final class Migration.MigrationResult<TResult>
extends java.lang.Object
In the case of a read operation the result will be this type. Write operations may need to return multiple results
and therefore use the Migration.MigrationWriteResult type.
| Constructor and Description |
|---|
MigrationResult(boolean success,
MigrationOrigin origin,
TResult result,
java.lang.Exception exception) |
| Modifier and Type | Method and Description |
|---|---|
java.util.Optional<java.lang.Exception> |
getException()
Get the exception associated with the result or an empty optional if there
was no exception.
|
MigrationOrigin |
getOrigin()
Get the origin associated with the result.
|
java.util.Optional<TResult> |
getResult()
The result.
|
boolean |
isSuccess()
Check if the operation was a success.
|
public MigrationResult(boolean success,
@NotNull
MigrationOrigin origin,
@Nullable
TResult result,
@Nullable
java.lang.Exception exception)
public boolean isSuccess()
public MigrationOrigin getOrigin()
public java.util.Optional<TResult> getResult()
public java.util.Optional<java.lang.Exception> getException()
A result may not be successful, but may also not have an exception associated with it.