Package net.sf.jasperreports.engine.base
Class JRBaseDataset
java.lang.Object
net.sf.jasperreports.engine.base.JRBaseDataset
- All Implemented Interfaces:
Serializable
,Cloneable
,JRChangeEventsSupport
,JRCloneable
,JRDataset
,JRIdentifiable
,JRPropertiesHolder
- Direct Known Subclasses:
JRDesignDataset
The base implementation of
JRDataset
.- Author:
- Lucian Chirita (lucianc@users.sourceforge.net)
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected JRField[]
protected JRExpression
protected JRGroup[]
protected final boolean
protected String
protected JRParameter[]
protected JRPropertiesMap
static final String
protected JRQuery
protected String
protected String
protected JRScriptlet[]
protected JRSortField[]
protected UUID
protected JRVariable[]
protected WhenResourceMissingTypeEnum
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
JRBaseDataset
(boolean isMain) protected
JRBaseDataset
(JRDataset dataset, JRBaseObjectFactory factory) -
Method Summary
Modifier and TypeMethodDescriptionclone()
Returns the property change support object for this instance.JRField[]
Returns the dataset's fields.Returns the dataset filter expression.JRGroup[]
Returns the dataset's groups.getName()
Returns the dataset name.Returns the dataset's parameters.Returns the parent properties holder, whose properties are used as defaults for this object.Returns this object's properties map.Returns the list of dynamic/expression-based properties for this dataset.getQuery()
Returns the query of the dataset.Returns the resource bundle base name.The name of the scriptlet class to be used when iterating this dataset.Returns the dataset's scriptlets.Returns the dataset's sort fields.getUUID()
Returns the dataset's variables.Returns the resource missing handling type.boolean
Checks whether the object has any properties.boolean
Decides whether this dataset is the main report dataset or a sub dataset.void
setWhenResourceMissingType
(WhenResourceMissingTypeEnum whenResourceMissingType) Sets the resource missing handling type.
-
Field Details
-
PROPERTY_WHEN_RESOURCE_MISSING_TYPE
- See Also:
-
isMain
protected final boolean isMain -
uuid
-
name
-
scriptletClass
-
scriptlets
-
parameters
-
query
-
fields
-
sortFields
-
variables
-
groups
-
resourceBundle
-
whenResourceMissingType
-
propertiesMap
-
filterExpression
-
-
Constructor Details
-
JRBaseDataset
protected JRBaseDataset(boolean isMain) -
JRBaseDataset
-
-
Method Details
-
getUUID
- Specified by:
getUUID
in interfaceJRIdentifiable
-
getName
Description copied from interface:JRDataset
Returns the dataset name. -
getScriptletClass
Description copied from interface:JRDataset
The name of the scriptlet class to be used when iterating this dataset.- Specified by:
getScriptletClass
in interfaceJRDataset
- Returns:
- the scriplet class name
-
getQuery
Description copied from interface:JRDataset
Returns the query of the dataset.The query is used by passing a connection is passed to the dataset when instantiating.
-
getScriptlets
Description copied from interface:JRDataset
Returns the dataset's scriptlets.- Specified by:
getScriptlets
in interfaceJRDataset
- Returns:
- the dataset's scriptlets
-
getParameters
Description copied from interface:JRDataset
Returns the dataset's parameters.- Specified by:
getParameters
in interfaceJRDataset
- Returns:
- the dataset's parameters
-
getFields
Description copied from interface:JRDataset
Returns the dataset's fields. -
getSortFields
Description copied from interface:JRDataset
Returns the dataset's sort fields.- Specified by:
getSortFields
in interfaceJRDataset
- Returns:
- the dataset's sort fields
-
getVariables
Description copied from interface:JRDataset
Returns the dataset's variables.- Specified by:
getVariables
in interfaceJRDataset
- Returns:
- the dataset's variables
-
getGroups
Description copied from interface:JRDataset
Returns the dataset's groups. -
isMainDataset
public boolean isMainDataset()Description copied from interface:JRDataset
Decides whether this dataset is the main report dataset or a sub dataset.- Specified by:
isMainDataset
in interfaceJRDataset
- Returns:
true
if and only if this dataset is the main report dataset
-
getResourceBundle
Description copied from interface:JRDataset
Returns the resource bundle base name.The resource bundle is used when evaluating expressions.
- Specified by:
getResourceBundle
in interfaceJRDataset
- Returns:
- the resource bundle base name
-
getWhenResourceMissingType
Description copied from interface:JRDataset
Returns the resource missing handling type.- Specified by:
getWhenResourceMissingType
in interfaceJRDataset
- Returns:
- the resource missing handling type
-
setWhenResourceMissingType
Description copied from interface:JRDataset
Sets the resource missing handling type.- Specified by:
setWhenResourceMissingType
in interfaceJRDataset
- Parameters:
whenResourceMissingType
- the resource missing handling type
-
hasProperties
public boolean hasProperties()Description copied from interface:JRPropertiesHolder
Checks whether the object has any properties.- Specified by:
hasProperties
in interfaceJRPropertiesHolder
- Returns:
- whether the object has any properties
-
getPropertiesMap
Description copied from interface:JRPropertiesHolder
Returns this object's properties map.- Specified by:
getPropertiesMap
in interfaceJRPropertiesHolder
- Returns:
- this object's properties map
-
getParentProperties
Description copied from interface:JRPropertiesHolder
Returns the parent properties holder, whose properties are used as defaults for this object.- Specified by:
getParentProperties
in interfaceJRPropertiesHolder
- Returns:
- the parent properties holder, or
null
if no parent
-
getPropertyExpressions
Description copied from interface:JRDataset
Returns the list of dynamic/expression-based properties for this dataset.- Specified by:
getPropertyExpressions
in interfaceJRDataset
- Returns:
- an array containing the expression-based properties of this dataset
-
getFilterExpression
Description copied from interface:JRDataset
Returns the dataset filter expression.This expression is used to filter the rows of the
data source
that this dataset will iterate on.This expression (if not null) is evaluated immediately after a new row is
produced
by the data source. The evaluation is performed using field and variable values corresponding to the new row. When the result of the evaluation isBoolean.TRUE
the row gets processed by the report filling engine. When the result is null orBoolean.FALSE
, the current row will be skipped and the datasource will be asked for the next row.- Specified by:
getFilterExpression
in interfaceJRDataset
- Returns:
- the dataset filter expression
-
clone
- Specified by:
clone
in interfaceJRCloneable
- Overrides:
clone
in classObject
-
getEventSupport
Description copied from interface:JRChangeEventsSupport
Returns the property change support object for this instance.- Specified by:
getEventSupport
in interfaceJRChangeEventsSupport
- Returns:
- the property change support object for this instance
-