Class StandardSubreportPartComponent
- java.lang.Object
-
- net.sf.jasperreports.parts.subreport.StandardSubreportPartComponent
-
- All Implemented Interfaces:
java.io.Serializable,java.lang.Cloneable,JRChangeEventsSupport,JRCloneable,PartComponent,SubreportPartComponent
public class StandardSubreportPartComponent extends java.lang.Object implements java.io.Serializable, SubreportPartComponent, JRChangeEventsSupport
StandardSubreportPartComponentimplementation.- Author:
- Lucian Chirita (lucianc@users.sourceforge.net)
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected JRExpressionexpressionprotected java.util.Map<java.lang.String,JRSubreportParameter>parametersMapprotected JRExpressionparametersMapExpressionprotected java.util.List<JRSubreportReturnValue>returnValuesValues to be copied from the subreport into the master report.protected java.lang.BooleanusingCache
-
Constructor Summary
Constructors Constructor Description StandardSubreportPartComponent()StandardSubreportPartComponent(SubreportPartComponent subreport, JRBaseObjectFactory factory)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddParameter(JRSubreportParameter subreportParameter)voidaddReturnValue(JRSubreportReturnValue returnValue)Adds a return value to the subreport.java.lang.Objectclone()JRPropertyChangeSupportgetEventSupport()Returns the property change support object for this instance.JRExpressiongetExpression()JRSubreportParameter[]getParameters()java.util.Map<java.lang.String,JRSubreportParameter>getParametersMap()JRExpressiongetParametersMapExpression()JRSubreportReturnValue[]getReturnValues()Returns the list of values to be copied from the subreport into the master.java.util.List<JRSubreportReturnValue>getReturnValuesList()Returns the list of values to be copied from the subreport into the master.java.lang.BooleangetUsingCache()Indicates if the engine is loading the current subreport from cache.JRSubreportParameterremoveParameter(java.lang.String name)booleanremoveReturnValue(JRSubreportReturnValue returnValue)Removes a return value from the subreport.voidsetExpression(JRExpression expression)voidsetParametersMapExpression(JRExpression parametersMapExpression)voidsetUsingCache(java.lang.Boolean usingCache)Specifies if the engine should be loading the current subreport from cache.
-
-
-
Field Detail
-
usingCache
protected java.lang.Boolean usingCache
-
parametersMap
protected java.util.Map<java.lang.String,JRSubreportParameter> parametersMap
-
returnValues
protected java.util.List<JRSubreportReturnValue> returnValues
Values to be copied from the subreport into the master report.
-
parametersMapExpression
protected JRExpression parametersMapExpression
-
expression
protected JRExpression expression
-
-
Constructor Detail
-
StandardSubreportPartComponent
public StandardSubreportPartComponent()
-
StandardSubreportPartComponent
public StandardSubreportPartComponent(SubreportPartComponent subreport, JRBaseObjectFactory factory)
-
-
Method Detail
-
getUsingCache
public java.lang.Boolean getUsingCache()
Description copied from interface:SubreportPartComponentIndicates if the engine is loading the current subreport from cache. Implementations of this method return the actual value for the internal flag that was explicitly set on this subreport.- Specified by:
getUsingCachein interfaceSubreportPartComponent- Returns:
- Boolean.TRUE if the subreport should be loaded from cache, Boolean.FALSE otherwise or null in case the flag was never explicitly set on this subreport element
-
setUsingCache
public void setUsingCache(java.lang.Boolean usingCache)
Description copied from interface:SubreportPartComponentSpecifies if the engine should be loading the current subreport from cache. If set to Boolean.TRUE, the reporting engine will try to recognize previously loaded subreports using their specified source. For example, it will recognize an subreport if the subreport source is a file name that it has already loaded, or if it is the same URL.If set to null, the engine will rely on some default value which depends on the type of the subreport expression. The cache is turned on by default only for subreports that have java.lang.String objects in their expressions.
- Specified by:
setUsingCachein interfaceSubreportPartComponent
-
getParametersMapExpression
public JRExpression getParametersMapExpression()
- Specified by:
getParametersMapExpressionin interfaceSubreportPartComponent
-
setParametersMapExpression
public void setParametersMapExpression(JRExpression parametersMapExpression)
-
getParameters
public JRSubreportParameter[] getParameters()
- Specified by:
getParametersin interfaceSubreportPartComponent
-
getParametersMap
public java.util.Map<java.lang.String,JRSubreportParameter> getParametersMap()
-
addParameter
public void addParameter(JRSubreportParameter subreportParameter) throws JRException
- Throws:
JRException
-
removeParameter
public JRSubreportParameter removeParameter(java.lang.String name)
-
addReturnValue
public void addReturnValue(JRSubreportReturnValue returnValue)
Adds a return value to the subreport.- Parameters:
returnValue- the return value to be added.
-
getReturnValues
public JRSubreportReturnValue[] getReturnValues()
Returns the list of values to be copied from the subreport into the master.- Specified by:
getReturnValuesin interfaceSubreportPartComponent- Returns:
- the list of values to be copied from the subreport into the master.
-
getReturnValuesList
public java.util.List<JRSubreportReturnValue> getReturnValuesList()
Returns the list of values to be copied from the subreport into the master.- Returns:
- list of
JRSubreportReturnValueobjects
-
removeReturnValue
public boolean removeReturnValue(JRSubreportReturnValue returnValue)
Removes a return value from the subreport.- Parameters:
returnValue- the return value to be removed- Returns:
trueif the return value was found and removed
-
getExpression
public JRExpression getExpression()
- Specified by:
getExpressionin interfaceSubreportPartComponent
-
setExpression
public void setExpression(JRExpression expression)
-
clone
public java.lang.Object clone()
- Specified by:
clonein interfaceJRCloneable- Overrides:
clonein classjava.lang.Object
-
getEventSupport
public JRPropertyChangeSupport getEventSupport()
Description copied from interface:JRChangeEventsSupportReturns the property change support object for this instance.- Specified by:
getEventSupportin interfaceJRChangeEventsSupport- Returns:
- the property change support object for this instance
-
-