Record Class ReportStatus.Failed
java.lang.Object
java.lang.Record
io.leandev.appfuse.report.ReportStatus.Failed
- Record Components:
code-report.invalid、report.cancelled或report.failedmessage- 可顯示的訊息;一般失敗為固定文字,不含例外訊息diagnostics- 模型或排版的 diagnostic(僅report.invalid)
- All Implemented Interfaces:
ReportStatus
- Enclosing interface:
ReportStatus
public static record ReportStatus.Failed(String code, String message, List<ReportDiagnostic> diagnostics)
extends Record
implements ReportStatus
失敗
- Since:
- 4.0.0
-
Nested Class Summary
Nested classes/interfaces inherited from interface ReportStatus
ReportStatus.Expired, ReportStatus.Failed, ReportStatus.Generating, ReportStatus.Ready -
Constructor Summary
ConstructorsConstructorDescriptionFailed(String code, String message, List<ReportDiagnostic> diagnostics) Creates an instance of aFailedrecord class. -
Method Summary
Modifier and TypeMethodDescriptioncode()Returns the value of thecoderecord component.Returns the value of thediagnosticsrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.message()Returns the value of themessagerecord component.static ReportStatus.Failed由例外建立;一般失敗不帶例外訊息(可能含內部路徑或 SQL),應用須自行記錄完整例外status()final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
Failed
Creates an instance of aFailedrecord class.- Parameters:
code- the value for thecoderecord componentmessage- the value for themessagerecord componentdiagnostics- the value for thediagnosticsrecord component
-
-
Method Details
-
status
- Specified by:
statusin interfaceReportStatus- Returns:
- 狀態名稱
-
of
由例外建立;一般失敗不帶例外訊息(可能含內部路徑或 SQL),應用須自行記錄完整例外- Parameters:
failure- 例外- Returns:
- 失敗狀態
-
toString
-
hashCode
-
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object). -
code
-
message
-
diagnostics
Returns the value of thediagnosticsrecord component.- Returns:
- the value of the
diagnosticsrecord component
-