/** * Creates a new {@link DataTransactionResult} with the provided * {@link ImmutableValue}s being the successful additions and * the provided {@link ImmutableValue}s that were replaced. The result type * is still {@link Type#SUCCESS}. If a {@link Value} * is necessary, use {@link Value#asImmutable()} to use this method. A * {@link DataTransactionResult} is always immutable once created, and any * {@link BaseValue}s should be provided as {@link ImmutableValue}s or * transformed into {@link ImmutableValue}s. * * @param successful The successfully added immutable values * @param replaced The successfully replaced immutable values * @return The new data transaction result */ public static DataTransactionResult successReplaceResult(Collection<ImmutableValue<?>> successful, Collection<ImmutableValue<?>> replaced) { return builder().success(successful).replace(replaced).result(Type.SUCCESS).build(); }
/** * Creates a new {@link DataTransactionResult} with the provided * {@link ImmutableValue} being the successful addition. The result type is * still {@link Type#SUCCESS}. If a {@link Value} is * necessary, use {@link Value#asImmutable()} to use this method. A * {@link DataTransactionResult} is always immutable once created, and any * {@link BaseValue}s should be provided as {@link ImmutableValue}s or * transformed into {@link ImmutableValue}s. * * @param successful The successfully added immutable value * @param replaced The replaced value * @return The new data transaction result */ public static DataTransactionResult successReplaceResult(final ImmutableValue<?> successful, final ImmutableValue<?> replaced) { return builder().result(Type.SUCCESS).success(successful).replace(replaced).build(); }
/** * Creates a new {@link DataTransactionResult} with the provided * {@link ImmutableValue} being the successful addition. The result type is * still {@link Type#SUCCESS}. If a {@link Value} is * necessary, use {@link Value#asImmutable()} to use this method. A * {@link DataTransactionResult} is always immutable once created, and any * {@link BaseValue}s should be provided as {@link ImmutableValue}s or * transformed into {@link ImmutableValue}s. * * @param value The successfully added immutable value * @return The new data transaction result */ public static DataTransactionResult successResult(final ImmutableValue<?> value) { return builder().success(value).result(Type.SUCCESS).build(); }
/** * Creates a {@link DataTransactionResult} with the provided * {@link ImmutableValue} being successfully removed. The result type is * still {@link Type#SUCCESS}. If a {@link Value} is necessary, use * {@link Value#asImmutable()} to use this method. A * {@link DataTransactionResult} is always immutable once created, and a * {@link BaseValue} should be provided as an {@link ImmutableValue} or * transformed into an {@link ImmutableValue}. * * @param removed The successfully removed value * @return The new data transaction result */ public static DataTransactionResult successRemove(ImmutableValue<?> removed) { return builder().replace(removed).result(Type.SUCCESS).build(); }
/** * Creates a {@link DataTransactionResult} with the provided * {@link ImmutableValue}s being successfully removed. The result type is * still {@link Type#SUCCESS}. If a {@link Value} is necessary, use * {@link Value#asImmutable()} to use this method. A {@link DataTransactionResult} * is always immutable once created, and any {@link BaseValue}s should be provided * as {@link ImmutableValue}s or transformed into {@link ImmutableValue}s. * * @param removed The successfully removed values * @return The new data transaction result */ public static DataTransactionResult successRemove(Collection<ImmutableValue<?>> removed) { return builder().replace(removed).result(Type.SUCCESS).build(); }
/** * Creates a new {@link DataTransactionResult} that ends in failure. The * provided {@link ImmutableValue} is considered "incompatible" and was not * successfully added. * * @param value The value that was incompatible or errored * @return The new data transaction result */ public static DataTransactionResult errorResult(final ImmutableValue<?> value) { return builder().result(Type.ERROR).reject(value).build(); }
/** * Creates a new {@link DataTransactionResult} that ends in failure. The * provided {@link ImmutableValue}s are considered "rejected" and were not * successfully added. * * @param values The values that were rejected * @return The new data transaction result */ public static DataTransactionResult failResult(final Iterable<ImmutableValue<?>> values) { return builder().reject(values).result(Type.FAILURE).build(); }
/** * Creates a new {@link DataTransactionResult} that ends in failure. The * provided {@link ImmutableValue} is considered "rejected" and was not * successfully added. * * @param value The value that was rejected * @return The new data transaction result */ public static DataTransactionResult failResult(final ImmutableValue<?> value) { return builder().reject(value).result(Type.FAILURE).build(); }
/** * Creates a new {@link DataTransactionResult} with the provided * {@link ImmutableValue}s being the successful additions and * the provided {@link ImmutableValue}s that were replaced. The result type * is still {@link Type#SUCCESS}. If a {@link Value} * is necessary, use {@link Value#asImmutable()} to use this method. A * {@link DataTransactionResult} is always immutable once created, and any * {@link BaseValue}s should be provided as {@link ImmutableValue}s or * transformed into {@link ImmutableValue}s. * * @param successful The successfully added immutable values * @param replaced The successfully replaced immutable values * @return The new data transaction result */ public static DataTransactionResult successReplaceResult(Collection<ImmutableValue<?>> successful, Collection<ImmutableValue<?>> replaced) { return builder().success(successful).replace(replaced).result(Type.SUCCESS).build(); }
/** * Creates a new {@link DataTransactionResult} with the provided * {@link ImmutableValue} being the successful addition. The result type is * still {@link Type#SUCCESS}. If a {@link Value} is * necessary, use {@link Value#asImmutable()} to use this method. A * {@link DataTransactionResult} is always immutable once created, and any * {@link BaseValue}s should be provided as {@link ImmutableValue}s or * transformed into {@link ImmutableValue}s. * * @param successful The successfully added immutable value * @param replaced The replaced value * @return The new data transaction result */ public static DataTransactionResult successReplaceResult(final ImmutableValue<?> successful, final ImmutableValue<?> replaced) { return builder().result(Type.SUCCESS).success(successful).replace(replaced).build(); }
/** * Creates a {@link DataTransactionResult} with the provided * {@link ImmutableValue} being successfully removed. The result type is * still {@link Type#SUCCESS}. If a {@link Value} is necessary, use * {@link Value#asImmutable()} to use this method. A * {@link DataTransactionResult} is always immutable once created, and a * {@link BaseValue} should be provided as an {@link ImmutableValue} or * transformed into an {@link ImmutableValue}. * * @param removed The successfully removed value * @return The new data transaction result */ public static DataTransactionResult successRemove(ImmutableValue<?> removed) { return builder().replace(removed).result(Type.SUCCESS).build(); }
/** * Creates a new {@link DataTransactionResult} with the provided * {@link ImmutableValue} being the successful addition. The result type is * still {@link Type#SUCCESS}. If a {@link Value} is * necessary, use {@link Value#asImmutable()} to use this method. A * {@link DataTransactionResult} is always immutable once created, and any * {@link BaseValue}s should be provided as {@link ImmutableValue}s or * transformed into {@link ImmutableValue}s. * * @param value The successfully added immutable value * @return The new data transaction result */ public static DataTransactionResult successResult(final ImmutableValue<?> value) { return builder().success(value).result(Type.SUCCESS).build(); }
/** * Creates a {@link DataTransactionResult} with the provided * {@link ImmutableValue}s being successfully removed. The result type is * still {@link Type#SUCCESS}. If a {@link Value} is necessary, use * {@link Value#asImmutable()} to use this method. A {@link DataTransactionResult} * is always immutable once created, and any {@link BaseValue}s should be provided * as {@link ImmutableValue}s or transformed into {@link ImmutableValue}s. * * @param removed The successfully removed values * @return The new data transaction result */ public static DataTransactionResult successRemove(Collection<ImmutableValue<?>> removed) { return builder().replace(removed).result(Type.SUCCESS).build(); }
/** * Creates a new {@link DataTransactionResult} that ends in failure. The * provided {@link ImmutableValue} is considered "incompatible" and was not * successfully added. * * @param value The value that was incompatible or errored * @return The new data transaction result */ public static DataTransactionResult errorResult(final ImmutableValue<?> value) { return builder().result(Type.ERROR).reject(value).build(); }
/** * Creates a new {@link DataTransactionResult} that ends in failure. The * provided {@link ImmutableValue}s are considered "rejected" and were not * successfully added. * * @param values The values that were rejected * @return The new data transaction result */ public static DataTransactionResult failResult(final Iterable<ImmutableValue<?>> values) { return builder().reject(values).result(Type.FAILURE).build(); }
/** * Creates a new {@link DataTransactionResult} that ends in failure. The * provided {@link ImmutableValue} is considered "rejected" and was not * successfully added. * * @param value The value that was rejected * @return The new data transaction result */ public static DataTransactionResult failResult(final ImmutableValue<?> value) { return builder().reject(value).result(Type.FAILURE).build(); }