Package io.keikai.model.impl
Class PivotCacheImpl
java.lang.Object
io.keikai.model.impl.PivotCacheImpl
- All Implemented Interfaces:
SPivotCache,Serializable
Default implementation of
SPivotCache.- Since:
- 7.0.0
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddField(SPivotCacheField field) Adds a cache field.getField(int index) Returns the cache field at the specified index.intReturns the number of fields.Returns all cache fields.getId()Returns the unique identifier of this cache.intReturns the number of data records in the cache.Returns the source data range.Returns the sheet name where the source data resides.voidrefresh()Refreshes the cache by re-reading data from the source range.voidsetRecordCount(int recordCount) voidsetSourceRange(CellRegion sourceRange) voidsetSourceSheetName(String sourceSheetName)
-
Constructor Details
-
PivotCacheImpl
-
-
Method Details
-
getId
Description copied from interface:SPivotCacheReturns the unique identifier of this cache.- Specified by:
getIdin interfaceSPivotCache- Returns:
- the cache ID
-
getSourceRange
Description copied from interface:SPivotCacheReturns the source data range.- Specified by:
getSourceRangein interfaceSPivotCache- Returns:
- the cell region of the source data
-
setSourceRange
-
getSourceSheetName
Description copied from interface:SPivotCacheReturns the sheet name where the source data resides.- Specified by:
getSourceSheetNamein interfaceSPivotCache- Returns:
- the source sheet name
-
setSourceSheetName
-
getFields
Description copied from interface:SPivotCacheReturns all cache fields.- Specified by:
getFieldsin interfaceSPivotCache- Returns:
- list of cache fields
-
getField
Description copied from interface:SPivotCacheReturns the cache field at the specified index.- Specified by:
getFieldin interfaceSPivotCache- Parameters:
index- zero-based field index- Returns:
- the cache field
-
addField
Adds a cache field.- Parameters:
field- the field to add
-
getFieldCount
public int getFieldCount()Description copied from interface:SPivotCacheReturns the number of fields.- Specified by:
getFieldCountin interfaceSPivotCache- Returns:
- field count
-
getRecordCount
public int getRecordCount()Description copied from interface:SPivotCacheReturns the number of data records in the cache.- Specified by:
getRecordCountin interfaceSPivotCache- Returns:
- record count
-
setRecordCount
public void setRecordCount(int recordCount) -
refresh
public void refresh()Description copied from interface:SPivotCacheRefreshes 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:
refreshin interfaceSPivotCache
-