public class XSSFPivotCache extends POIXMLDocumentPart implements PivotCache, Serializable
PivotCache.CacheField, PivotCache.CacheRecord, PivotCache.SheetSource
DEFAULT_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, toString
public XSSFPivotCache()
public XSSFPivotCache(PackagePart part, PackageRelationship rel)
public XSSFPivotCache(long cacheId, POIXMLDocumentPart parent, PackagePart part, PackageRelationship rel) throws IOException
IOException
protected void onDocumentCreate()
POIXMLDocumentPart
onDocumentCreate
in class POIXMLDocumentPart
protected void onDocumentRead() throws IOException
POIXMLDocumentPart
onDocumentRead
in class POIXMLDocumentPart
IOException
protected 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 POIXMLDocumentPart
IOException
public Workbook getWorkbook()
PivotCache
getWorkbook
in interface PivotCache
public void setCacheId(long cacheId)
public long getCacheId()
PivotCache
getCacheId
in interface PivotCache
public List<PivotCache.CacheField> getFields()
PivotCache
getFields
in interface PivotCache
public List<PivotCache.CacheRecord> getRecords()
PivotCache
getRecords
in interface PivotCache
public void setSheetSource(AreaReference sourceRef)
public PivotCache.SheetSource getSheetSource()
PivotCache
PivotCache.SheetSource
getSheetSource
in interface PivotCache
public short getRefreshedVersion()
getRefreshedVersion
in interface PivotCache
public short getMinRefreshableVersion()
getMinRefreshableVersion
in interface PivotCache
public short getCreatedVersion()
getCreatedVersion
in interface PivotCache
Copyright © 2020. All rights reserved.