Class TableReportDataset
- java.lang.Object
-
- net.sf.jasperreports.components.table.fill.TableReportDataset
-
- All Implemented Interfaces:
Cloneable
,JRCloneable
,JRDataset
,JRIdentifiable
,JRPropertiesHolder
public class TableReportDataset extends Object implements JRDataset
- Author:
- Lucian Chirita (lucianc@users.sourceforge.net)
-
-
Constructor Summary
Constructors Constructor Description TableReportDataset(JRDataset tableSubdataset, String name)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addFirstGroup(JRGroup group)
void
addScriptlet(String name, Class<? extends JRAbstractScriptlet> type)
Object
clone()
JRField[]
getFields()
Returns the dataset's fields.JRExpression
getFilterExpression()
Returns the dataset filter expression.JRGroup[]
getGroups()
Returns the dataset's groups.String
getName()
Returns the dataset name.JRParameter[]
getParameters()
Returns the dataset's parameters.JRPropertiesHolder
getParentProperties()
Returns the parent properties holder, whose properties are used as defaults for this object.JRPropertiesMap
getPropertiesMap()
Returns this object's properties map.DatasetPropertyExpression[]
getPropertyExpressions()
Returns the list of dynamic/expression-based properties for this dataset.JRQuery
getQuery()
Returns the query of the dataset.String
getResourceBundle()
Returns the resource bundle base name.String
getScriptletClass()
The name of the scriptlet class to be used when iterating this dataset.JRScriptlet[]
getScriptlets()
Returns the dataset's scriptlets.JRSortField[]
getSortFields()
Returns the dataset's sort fields.TableReportGroup[]
getTableGroups()
UUID
getUUID()
JRVariable[]
getVariables()
Returns the dataset's variables.WhenResourceMissingTypeEnum
getWhenResourceMissingType()
Returns the resource missing handling type.boolean
hasProperties()
Checks whether the object has any properties.boolean
isMainDataset()
Decides whether this dataset is the main report dataset or a sub dataset.void
setWhenResourceMissingType(WhenResourceMissingTypeEnum whenResourceMissingType)
Sets the resource missing handling type.
-
-
-
Method Detail
-
getFields
public JRField[] getFields()
Description copied from interface:JRDataset
Returns the dataset's fields.
-
getFilterExpression
public JRExpression 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
-
getTableGroups
public TableReportGroup[] getTableGroups()
-
getGroups
public JRGroup[] getGroups()
Description copied from interface:JRDataset
Returns the dataset's groups.
-
addFirstGroup
public void addFirstGroup(JRGroup group)
-
getUUID
public UUID getUUID()
- Specified by:
getUUID
in interfaceJRIdentifiable
-
getName
public String getName()
Description copied from interface:JRDataset
Returns the dataset name.
-
getParameters
public JRParameter[] getParameters()
Description copied from interface:JRDataset
Returns the dataset's parameters.- Specified by:
getParameters
in interfaceJRDataset
- Returns:
- the dataset's parameters
-
getQuery
public JRQuery 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.
-
getResourceBundle
public String 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
-
getScriptletClass
public String 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
-
getScriptlets
public JRScriptlet[] getScriptlets()
Description copied from interface:JRDataset
Returns the dataset's scriptlets.- Specified by:
getScriptlets
in interfaceJRDataset
- Returns:
- the dataset's scriptlets
-
getSortFields
public JRSortField[] getSortFields()
Description copied from interface:JRDataset
Returns the dataset's sort fields.- Specified by:
getSortFields
in interfaceJRDataset
- Returns:
- the dataset's sort fields
-
getVariables
public JRVariable[] getVariables()
Description copied from interface:JRDataset
Returns the dataset's variables.- Specified by:
getVariables
in interfaceJRDataset
- Returns:
- the dataset's variables
-
getWhenResourceMissingType
public WhenResourceMissingTypeEnum getWhenResourceMissingType()
Description copied from interface:JRDataset
Returns the resource missing handling type.- Specified by:
getWhenResourceMissingType
in interfaceJRDataset
- Returns:
- the resource missing handling type
-
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
-
setWhenResourceMissingType
public void setWhenResourceMissingType(WhenResourceMissingTypeEnum whenResourceMissingType)
Description copied from interface:JRDataset
Sets the resource missing handling type.- Specified by:
setWhenResourceMissingType
in interfaceJRDataset
- Parameters:
whenResourceMissingType
- the resource missing handling type
-
getParentProperties
public JRPropertiesHolder 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
-
getPropertiesMap
public JRPropertiesMap getPropertiesMap()
Description copied from interface:JRPropertiesHolder
Returns this object's properties map.- Specified by:
getPropertiesMap
in interfaceJRPropertiesHolder
- Returns:
- this object's properties map
-
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
-
getPropertyExpressions
public DatasetPropertyExpression[] 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
-
clone
public Object clone()
- Specified by:
clone
in interfaceJRCloneable
- Overrides:
clone
in classObject
-
addScriptlet
public void addScriptlet(String name, Class<? extends JRAbstractScriptlet> type)
-
-