Class StreamingStyleCache

java.lang.Object
io.jmix.reports.yarg.formatters.impl.streaming.StreamingStyleCache

public class StreamingStyleCache extends Object
Clones template cell styles into the result workbook once each, keyed by the template style index. Deduplication keeps the result workbook far below the XLSX ~64k cell-style limit even when millions of cells reuse the same template styles.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected final Map<Short,org.apache.poi.ss.usermodel.CellStyle>
     
    protected final org.apache.poi.xssf.streaming.SXSSFWorkbook
     
  • Constructor Summary

    Constructors
    Constructor
    Description
    StreamingStyleCache(org.apache.poi.xssf.streaming.SXSSFWorkbook resultWorkbook)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    @Nullable org.apache.poi.ss.usermodel.CellStyle
    resultStyleFor(@Nullable org.apache.poi.xssf.usermodel.XSSFCellStyle templateStyle)
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • resultWorkbook

      protected final org.apache.poi.xssf.streaming.SXSSFWorkbook resultWorkbook
    • byTemplateIndex

      protected final Map<Short,org.apache.poi.ss.usermodel.CellStyle> byTemplateIndex
  • Constructor Details

    • StreamingStyleCache

      public StreamingStyleCache(org.apache.poi.xssf.streaming.SXSSFWorkbook resultWorkbook)
  • Method Details

    • resultStyleFor

      public @Nullable org.apache.poi.ss.usermodel.CellStyle resultStyleFor(@Nullable org.apache.poi.xssf.usermodel.XSSFCellStyle templateStyle)