Class PivotCacheImpl

java.lang.Object
io.keikai.model.impl.PivotCacheImpl
All Implemented Interfaces:
SPivotCache, Serializable

public class PivotCacheImpl extends Object implements SPivotCache, Serializable
Default implementation of SPivotCache.
Since:
7.0.0
See Also:
  • Constructor Details

  • Method Details

    • getId

      public String getId()
      Description copied from interface: SPivotCache
      Returns the unique identifier of this cache.
      Specified by:
      getId in interface SPivotCache
      Returns:
      the cache ID
    • getSourceRange

      public CellRegion getSourceRange()
      Description copied from interface: SPivotCache
      Returns the source data range.
      Specified by:
      getSourceRange in interface SPivotCache
      Returns:
      the cell region of the source data
    • setSourceRange

      public void setSourceRange(CellRegion sourceRange)
    • getSourceSheetName

      public String getSourceSheetName()
      Description copied from interface: SPivotCache
      Returns the sheet name where the source data resides.
      Specified by:
      getSourceSheetName in interface SPivotCache
      Returns:
      the source sheet name
    • setSourceSheetName

      public void setSourceSheetName(String sourceSheetName)
    • getFields

      public List<SPivotCacheField> getFields()
      Description copied from interface: SPivotCache
      Returns all cache fields.
      Specified by:
      getFields in interface SPivotCache
      Returns:
      list of cache fields
    • getField

      public SPivotCacheField getField(int index)
      Description copied from interface: SPivotCache
      Returns the cache field at the specified index.
      Specified by:
      getField in interface SPivotCache
      Parameters:
      index - zero-based field index
      Returns:
      the cache field
    • addField

      public void addField(SPivotCacheField field)
      Adds a cache field.
      Parameters:
      field - the field to add
    • getFieldCount

      public int getFieldCount()
      Description copied from interface: SPivotCache
      Returns the number of fields.
      Specified by:
      getFieldCount in interface SPivotCache
      Returns:
      field count
    • getRecordCount

      public int getRecordCount()
      Description copied from interface: SPivotCache
      Returns the number of data records in the cache.
      Specified by:
      getRecordCount in interface SPivotCache
      Returns:
      record count
    • setRecordCount

      public void setRecordCount(int recordCount)
    • refresh

      public void refresh()
      Description copied from interface: SPivotCache
      Refreshes the cache by re-reading data from the source range.

      Until the pivot calculation engine is implemented this throws UnsupportedOperationException (fail-loud) rather than silently no-op'ing, so callers cannot mistake a stale cache for a refreshed one.

      Specified by:
      refresh in interface SPivotCache