public class ResourceFieldTemplate extends AbstractTemplate
Constructor and Description |
---|
ResourceFieldTemplate()
Creates a new template.
|
Modifier and Type | Method and Description |
---|---|
ResourceFieldTemplate |
clone()
Clones the template.
|
String |
getField()
Returns the field name.
|
String |
getFormula()
Returns the formula used to compute the value of the data source.
|
String |
getNullValue()
Returns the string that represents a
null value. |
String |
getResourceIdentifier()
Returns the resource class name.
|
Object |
getValue(ExpressionRuntime runtime,
ReportElement element)
Returns the current value for the data source.
|
void |
setField(String field)
Sets the field name.
|
void |
setFormula(String formula)
Defines the formula used to compute the value of this data source.
|
void |
setNullValue(String nullValue)
Sets the string that represents a
null value. |
void |
setResourceIdentifier(String resourceClassName)
Sets the resource class name.
|
getInstance, getName, setName
public String getField()
public void setField(String field)
field
- the field name.public String getFormula()
public void setFormula(String formula)
formula
- the formula for the data source.public String getResourceIdentifier()
public void setResourceIdentifier(String resourceClassName) throws MissingResourceException
resourceClassName
- the resource class name.MissingResourceException
- if the resource is missing.public String getNullValue()
null
value.null
value.public void setNullValue(String nullValue)
null
value.nullValue
- the string that represents a null
value.public Object getValue(ExpressionRuntime runtime, ReportElement element)
runtime
- the expression runtime that is used to evaluate formulas and expressions when computing the value of this
filter.element
- public ResourceFieldTemplate clone() throws CloneNotSupportedException
clone
in interface DataSource
clone
in class AbstractTemplate
CloneNotSupportedException
- this should never happen.