Package net.sf.jasperreports.engine.base
Class JRBaseGenericElementParameter
- java.lang.Object
-
- net.sf.jasperreports.engine.base.JRBaseGenericElementParameter
-
- All Implemented Interfaces:
Serializable
,Cloneable
,JRCloneable
,JRGenericElementParameter
- Direct Known Subclasses:
JRDesignGenericElementParameter
public class JRBaseGenericElementParameter extends Object implements JRGenericElementParameter, Serializable
A read-only implementation ofJRGenericElementParameter
that is included in compiled reports.- Author:
- Lucian Chirita (lucianc@users.sourceforge.net)
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected String
name
protected boolean
skipWhenEmpty
protected JRExpression
valueExpression
-
Constructor Summary
Constructors Modifier Constructor Description protected
JRBaseGenericElementParameter()
JRBaseGenericElementParameter(JRGenericElementParameter parameter, JRBaseObjectFactory factory)
Creates a generic element parameter by copying an existing instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Object
clone()
String
getName()
Returns the name of the parameter.JRExpression
getValueExpression()
Returns the expression that provides parameter values.boolean
isSkipWhenEmpty()
Decides whether the parameter is skipped when its value evaluates tonull
.
-
-
-
Field Detail
-
name
protected String name
-
valueExpression
protected JRExpression valueExpression
-
skipWhenEmpty
protected boolean skipWhenEmpty
-
-
Constructor Detail
-
JRBaseGenericElementParameter
protected JRBaseGenericElementParameter()
-
JRBaseGenericElementParameter
public JRBaseGenericElementParameter(JRGenericElementParameter parameter, JRBaseObjectFactory factory)
Creates a generic element parameter by copying an existing instance.- Parameters:
parameter
- the parameter to copyfactory
- the object factory to be used for creating sub objects
-
-
Method Detail
-
getName
public String getName()
Description copied from interface:JRGenericElementParameter
Returns the name of the parameter.The name will be propagated into the generic print element, as in
JRGenericPrintElement.setParameterValue(String, Object)
.- Specified by:
getName
in interfaceJRGenericElementParameter
- Returns:
- the name of the parameter
-
getValueExpression
public JRExpression getValueExpression()
Description copied from interface:JRGenericElementParameter
Returns the expression that provides parameter values.The result of the expression evaluation will be propagated into the generic print element as parameter value, as in
JRGenericPrintElement.setParameterValue(String, Object)
.- Specified by:
getValueExpression
in interfaceJRGenericElementParameter
- Returns:
- the parameter's value expression
-
isSkipWhenEmpty
public boolean isSkipWhenEmpty()
Description copied from interface:JRGenericElementParameter
Decides whether the parameter is skipped when its value evaluates tonull
.When the parameter's expression evaluates to
null
and this flag is set and , the parameter is not included in the generated print element. If the flag is not set, the parameter is included with anull
value.- Specified by:
isSkipWhenEmpty
in interfaceJRGenericElementParameter
- Returns:
- whether the parameter is skipped when its value is
null
-
clone
public Object clone()
- Specified by:
clone
in interfaceJRCloneable
- Overrides:
clone
in classObject
-
-