Record Class StoredReport

java.lang.Object
java.lang.Record
io.leandev.appfuse.report.StoredReport
Record Components:
partition - 儲存分區鍵
fileId - write-once 的儲存識別;下載時作為 ETag,但不是授權憑證
filename - 建議檔名
contentType - MIME 類型
size - 位元組數
pageCount - 頁數
createdAt - 文件時間(PDF metadata);不用於保存期限
storedAt - 實際保存完成的時間;保存期限以此計算
diagnostics - render 的 INFO 與 WARNING diagnostic

public record StoredReport(String partition, String fileId, String filename, String contentType, long size, int pageCount, Instant createdAt, Instant storedAt, List<ReportDiagnostic> diagnostics) extends Record
已保存到 FileStorage 的報表
Since:
4.0.0
  • Constructor Details

    • StoredReport

      public StoredReport(String partition, String fileId, String filename, String contentType, long size, int pageCount, Instant createdAt, Instant storedAt, List<ReportDiagnostic> diagnostics)
      Creates an instance of a StoredReport record class.
      Parameters:
      partition - the value for the partition record component
      fileId - the value for the fileId record component
      filename - the value for the filename record component
      contentType - the value for the contentType record component
      size - the value for the size record component
      pageCount - the value for the pageCount record component
      createdAt - the value for the createdAt record component
      storedAt - the value for the storedAt record component
      diagnostics - the value for the diagnostics record component
  • Method Details

    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      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. Reference components are compared with Objects::equals(Object,Object); primitive components are compared with the compare method from their corresponding wrapper classes.
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • partition

      public String partition()
      Returns the value of the partition record component.
      Returns:
      the value of the partition record component
    • fileId

      public String fileId()
      Returns the value of the fileId record component.
      Returns:
      the value of the fileId record component
    • filename

      public String filename()
      Returns the value of the filename record component.
      Returns:
      the value of the filename record component
    • contentType

      public String contentType()
      Returns the value of the contentType record component.
      Returns:
      the value of the contentType record component
    • size

      public long size()
      Returns the value of the size record component.
      Returns:
      the value of the size record component
    • pageCount

      public int pageCount()
      Returns the value of the pageCount record component.
      Returns:
      the value of the pageCount record component
    • createdAt

      public Instant createdAt()
      Returns the value of the createdAt record component.
      Returns:
      the value of the createdAt record component
    • storedAt

      public Instant storedAt()
      Returns the value of the storedAt record component.
      Returns:
      the value of the storedAt record component
    • diagnostics

      public List<ReportDiagnostic> diagnostics()
      Returns the value of the diagnostics record component.
      Returns:
      the value of the diagnostics record component