クラス BusinessError

java.lang.Object
org.thinkit.framework.envali.result.BusinessError
すべての実装されたインタフェース:
Serializable

public final class BusinessError
extends Object
implements Serializable
The class that represents a business error.

BusinessError handles both recoverable error and unrecoverable error, and can be instantiated by calling the dedicated static constructor for each.

Provides hasNestedError() as a feature to test if a nested error of ValidationResult exists, and hasError() to test if a business error exists.

 No error:
 
 BusinessError businessError = BusinessError.none();
 
 
 Recoverable error:
 
 BusinessError businessError = BusinessError.recoverable("any error message");
 
 
 Unrecoverable error:
 
 BusinessError businessError = BusinessError.unrecoverable("any error message");
 
 
 Nested error:
 
 BusinessError businessError = BusinessError.nestedError(validationResult);
 businessError.hasNestedError(); // It returns true
 
 
導入されたバージョン:
1.0.1
関連項目:
直列化された形式