public class XSSFPivotCache extends POIXMLDocumentPart implements PivotCache, Serializable
PivotCache.CacheField, PivotCache.CacheRecord, PivotCache.SheetSourceDEFAULT_XML_OPTIONS| Constructor and Description |
|---|
XSSFPivotCache() |
XSSFPivotCache(long cacheId,
POIXMLDocumentPart parent,
PackagePart part,
PackageRelationship rel) |
XSSFPivotCache(PackagePart part,
PackageRelationship rel) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
commit()
Save the content in the underlying package part.
|
long |
getCacheId()
Returns the cache id
|
short |
getCreatedVersion() |
List<PivotCache.CacheField> |
getFields()
Returns all cache fields
|
short |
getMinRefreshableVersion() |
List<PivotCache.CacheRecord> |
getRecords()
Returns all cache records
|
short |
getRefreshedVersion() |
PivotCache.SheetSource |
getSheetSource()
Returns
PivotCache.SheetSource |
Workbook |
getWorkbook()
Return the parent workbook
|
protected void |
onDocumentCreate()
Fired when a new package part is created
|
protected void |
onDocumentRead()
Fired when a package part is read
|
void |
setCacheId(long cacheId) |
void |
setSheetSource(AreaReference sourceRef) |
addRelation, clearMemoryPackagePart, createRelationship, createRelationship, createRelationship, getPackagePart, getPackageRelationship, getParent, getRelationById, getRelationCounter, getRelationId, getRelations, getTargetPart, onDocumentRemove, onSave, read, rebase, removeRelation, removeRelation, toStringpublic XSSFPivotCache()
public XSSFPivotCache(PackagePart part, PackageRelationship rel)
public XSSFPivotCache(long cacheId,
POIXMLDocumentPart parent,
PackagePart part,
PackageRelationship rel)
throws IOException
IOExceptionprotected void onDocumentCreate()
POIXMLDocumentPartonDocumentCreate in class POIXMLDocumentPartprotected void onDocumentRead()
throws IOException
POIXMLDocumentPartonDocumentRead in class POIXMLDocumentPartIOExceptionprotected void commit()
throws IOException
POIXMLDocumentPart
protected void commit() throws IOException {
PackagePart part = getPackagePart();
OutputStream out = part.getOutputStream();
XmlObject bean = getXmlBean(); //the "model" which holds changes in memory
bean.save(out, DEFAULT_XML_OPTIONS);
out.close();
}
commit in class POIXMLDocumentPartIOExceptionpublic Workbook getWorkbook()
PivotCachegetWorkbook in interface PivotCachepublic void setCacheId(long cacheId)
public long getCacheId()
PivotCachegetCacheId in interface PivotCachepublic List<PivotCache.CacheField> getFields()
PivotCachegetFields in interface PivotCachepublic List<PivotCache.CacheRecord> getRecords()
PivotCachegetRecords in interface PivotCachepublic void setSheetSource(AreaReference sourceRef)
public PivotCache.SheetSource getSheetSource()
PivotCachePivotCache.SheetSourcegetSheetSource in interface PivotCachepublic short getRefreshedVersion()
getRefreshedVersion in interface PivotCachepublic short getMinRefreshableVersion()
getMinRefreshableVersion in interface PivotCachepublic short getCreatedVersion()
getCreatedVersion in interface PivotCacheCopyright © 2020. All rights reserved.