public class JRFillContext extends Object
The context is created by the master filler and inherited by the subfillers.
JRBaseFiller
Modifier and Type | Class and Description |
---|---|
static interface |
JRFillContext.FillCacheDisposable |
Constructor and Description |
---|
JRFillContext(BaseReportFiller masterFiller)
Constructs a fill context.
|
Modifier and Type | Method and Description |
---|---|
void |
addDataRecordResult(FillDatasetPosition fillPosition,
Object recorded) |
void |
cacheDone() |
boolean |
cancelRunningQuery()
Cancels the running query.
|
void |
clearRunningQueryExecuter()
Clears the running query executer.
|
<T extends Deduplicable> |
deduplicate(T object)
Search for a duplicate of a given object in the fill context, and add the object
to the context if no duplicate found.
|
void |
dispose() |
protected int |
generatedFillerId() |
int |
generateFillElementId()
Generates a fresh fill element Id.
|
DataCacheHandler |
getCacheHandler() |
protected Object |
getContextParameterValue(String parameterName) |
DataRecorder |
getDataRecorder() |
DataSnapshot |
getDataSnapshot() |
Object |
getFillCache(String key) |
Renderable |
getLoadedRenderer(Object source)
Gets a cached image renderer.
|
JasperReport |
getLoadedSubreport(Object source)
Gets a cached subreport.
|
JRTemplate |
getLoadedTemplate(Object source)
Gets a cached template.
|
BaseReportFiller |
getMasterFiller() |
FormatFactory |
getMasterFormatFactory() |
Locale |
getMasterLocale() |
TimeZone |
getMasterTimeZone() |
JRPrintPage |
getPrintPage()
Returns the current master print page.
|
RenderersCache |
getRenderersCache() |
ReportContext |
getReportContext() |
protected JRStyledTextUtil |
getStyledTextUtil() |
JRVirtualizationContext |
getVirtualizationContext()
Returns the virtualization context.
|
boolean |
hasDataSnapshot() |
boolean |
hasLoadedRenderer(Object source)
Checks whether an image renderer given by source has already been loaded and cached.
|
boolean |
hasLoadedSubreport(Object source)
Checks whether a subreport given by source has already been loaded and cached.
|
boolean |
hasLoadedTemplate(Object source)
Checks whether a template given by source has already been loaded and cached.
|
boolean |
isCanceled() |
boolean |
isCollectingBookmarks() |
boolean |
isIgnorePagination()
Decides whether the filling should ignore pagination.
|
boolean |
isLegacyElementStretchEnabled()
Deprecated.
To be removed.
|
boolean |
isUsingVirtualizer()
Decides whether virtualization is used by the filling process.
|
void |
lockVirtualizationContext() |
void |
markCanceled() |
void |
registerLoadedRenderer(Object source,
Renderable renderer)
Registers an image renderer loaded from a source.
|
void |
registerLoadedSubreport(Object source,
JasperReport subreport)
Registers a subreport loaded from a source.
|
void |
registerLoadedTemplate(Object source,
JRTemplate template)
Registers a template loaded from a source.
|
void |
registerReportStyles(JasperReport jasperReport,
UUID id,
List<JRStyle> styles) |
void |
registerReportStyles(String reportLocation,
UUID id,
List<JRStyle> styles) |
void |
setFillCache(String key,
Object value) |
void |
setMasterFormatFactory(FormatFactory masterFormatFactory) |
void |
setMasterLocale(Locale masterLocale) |
void |
setMasterTimeZone(TimeZone masterTimeZone) |
void |
setPrintPage(JRPrintPage page)
Sets the current master print page.
|
void |
setReportContext(ReportContext reportContext) |
void |
setRunningQueryExecuter(JRQueryExecuter queryExecuter)
Sets the running query executer.
|
void |
setUsingVirtualizer(boolean usingVirtualizer)
Sets the flag indicating whether a virtualizer is used by the filling process.
|
void |
unlockVirtualizationContext() |
public JRFillContext(BaseReportFiller masterFiller)
public BaseReportFiller getMasterFiller()
protected JRStyledTextUtil getStyledTextUtil()
public boolean hasLoadedRenderer(Object source)
source
- the source of the image renderergetLoadedRenderer(Object)
,
registerLoadedRenderer(Object, Renderable)
public Renderable getLoadedRenderer(Object source)
source
- the source renderer of the imageregisterLoadedRenderer(Object, Renderable)
public void registerLoadedRenderer(Object source, Renderable renderer)
The image renderer is cached for further use.
source
- the source that was used to load the image rendererrenderer
- the loaded image renderergetLoadedRenderer(Object)
public RenderersCache getRenderersCache()
public boolean hasLoadedSubreport(Object source)
source
- the source of the subreportgetLoadedSubreport(Object)
,
registerLoadedSubreport(Object, JasperReport)
public JasperReport getLoadedSubreport(Object source)
source
- the source of the subreportregisterLoadedSubreport(Object, JasperReport)
public void registerLoadedSubreport(Object source, JasperReport subreport)
The subreport is cached for further use.
source
- the source that was used to load the subreportsubreport
- the loaded subreportgetLoadedSubreport(Object)
public void setUsingVirtualizer(boolean usingVirtualizer)
usingVirtualizer
- whether virtualization is usedisUsingVirtualizer()
public boolean isUsingVirtualizer()
true
if and only if a virtualizer is usedsetUsingVirtualizer(boolean)
,
JRParameter.REPORT_VIRTUALIZER
public void setPrintPage(JRPrintPage page)
page
- the master print pagegetPrintPage()
public JRPrintPage getPrintPage()
setPrintPage(JRPrintPage)
public boolean isIgnorePagination()
JRParameter.IS_IGNORE_PAGINATION
,
BaseReportFiller.isIgnorePagination()
public boolean isLegacyElementStretchEnabled()
public void setRunningQueryExecuter(JRQueryExecuter queryExecuter)
This method is called before firing the query.
queryExecuter
- the running query executerpublic void clearRunningQueryExecuter()
This method is called after the query has ended.
public boolean cancelRunningQuery() throws JRException
true
if and only if there is a running query and it has been canceled.JRException
public JRVirtualizationContext getVirtualizationContext()
public void lockVirtualizationContext()
public void unlockVirtualizationContext()
public FormatFactory getMasterFormatFactory()
public void setMasterFormatFactory(FormatFactory masterFormatFactory)
public Locale getMasterLocale()
public void setMasterLocale(Locale masterLocale)
public TimeZone getMasterTimeZone()
public void setMasterTimeZone(TimeZone masterTimeZone)
public boolean hasLoadedTemplate(Object source)
source
- the source of the templategetLoadedTemplate(Object)
,
registerLoadedTemplate(Object, JRTemplate)
public JRTemplate getLoadedTemplate(Object source)
source
- the source of the templageregisterLoadedTemplate(Object, JRTemplate)
public void registerLoadedTemplate(Object source, JRTemplate template)
The template is cached for further use.
source
- the source that was used to load the templatetemplate
- the loaded templagegetLoadedTemplate(Object)
public <T extends Deduplicable> T deduplicate(T object)
object
- the object to be searched or addedpublic int generateFillElementId()
JRPrintElement.getSourceElementId()
protected int generatedFillerId()
public ReportContext getReportContext()
public void setReportContext(ReportContext reportContext)
public DataCacheHandler getCacheHandler()
public DataSnapshot getDataSnapshot()
public boolean hasDataSnapshot()
public DataRecorder getDataRecorder()
public void addDataRecordResult(FillDatasetPosition fillPosition, Object recorded)
public void cacheDone()
public void markCanceled()
public boolean isCanceled()
public void dispose()
public boolean isCollectingBookmarks()
public void registerReportStyles(JasperReport jasperReport, UUID id, List<JRStyle> styles)
Copyright © 2017. All rights reserved.