Class GroupList
java.lang.Object
org.pentaho.reporting.engine.classic.core.modules.parser.base.GroupList
- All Implemented Interfaces:
Serializable,Cloneable
Deprecated.
The group-list is a legacy class and should not be used outside the legacy handling.
The group list is used to store groups in a ordered way. The less specific groups are guaranteed to be listed before
the more specific subgroups.
Groups are ordered by comparing the declared fieldnames for the groups. A subgroup of an group must contain all
fields from its parent plus at least one new field.
This implementation is not synchronized.
The group list cannot be empty. JFreeReport needs at least one group instance to work as expected. By default, this
default instance does not define any fields (and therefore contains the complete report) and has no Bands defined
(rendering it invisible). You cannot remove that group. Every attempt to remove the last group will recreates a new
default group.
As of version 0.8.10, this list only exists for the support for the legacy parsing.
- Author:
- Thomas Morgner
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringDeprecated.The name of the automaticly created default group. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidDeprecated.Adds a group to the list.voidaddAll(Collection c) Deprecated.Adds all groups of the collection to this group list.voidclear()Deprecated.Clears the list.clone()Deprecated.Clones the group list and all contained groups.Deprecated.Creates a hierarchical group structure and moves the data group body to the inner most group.get(int i) Deprecated.Returns the group at a given position in the list.getGroupByName(String name) Deprecated.Searches a group by its defined name.protected RelationalGroup[]Deprecated.Returns a direct reference to the group cache.voidDeprecated.iterator()Deprecated.Returns an iterator for the groups of the list.booleanDeprecated.Removes an group from the list.intsize()Deprecated.Returns the number of groups in the list.toString()Deprecated.Returns a string representation of the list (useful for debugging).
-
Field Details
-
DEFAULT_GROUP_NAME
Deprecated.The name of the automaticly created default group.- See Also:
-
-
Constructor Details
-
GroupList
public GroupList()Deprecated.Constructs a new group list, with only a default group inside. -
GroupList
Deprecated.Creates a new group list and copies the contents of the given grouplist. If the given group list was assigned with a report definition, then the new group list will share that registration.- Parameters:
list- groups to add to the list.
-
-
Method Details
-
get
Deprecated.Returns the group at a given position in the list.- Parameters:
i- the position index (zero-based).- Returns:
- the report group.
-
remove
Deprecated.Removes an group from the list.- Parameters:
o- the group that should be removed.- Returns:
- a boolean indicating whether or not the object was removed.
- Throws:
NullPointerException- if the given group object is null.
-
clear
public void clear()Deprecated.Clears the list. -
add
Deprecated.Adds a group to the list.- Parameters:
o- the group object.
-
addAll
Deprecated.Adds all groups of the collection to this group list. This method will result in a ClassCastException if the collection does not contain Group objects.- Parameters:
c- the collection that contains the groups.- Throws:
NullPointerException- if the given collection is null.ClassCastException- if the collection does not contain groups.
-
clone
Deprecated.Clones the group list and all contained groups.- Overrides:
clonein classObject- Returns:
- a clone of this list.
- Throws:
CloneNotSupportedException- if cloning the element failed.- See Also:
-
iterator
Deprecated.Returns an iterator for the groups of the list.- Returns:
- An iterator over all groups of the list.
-
size
public int size()Deprecated.Returns the number of groups in the list.- Returns:
- The number of groups in the list.
-
toString
Deprecated.Returns a string representation of the list (useful for debugging). -
getGroupCache
Deprecated.Returns a direct reference to the group cache.- Returns:
- the groups of this list as array.
-
getGroupByName
Deprecated.Searches a group by its defined name. This method returns null, if the group was not found.- Parameters:
name- the name of the group.- Returns:
- the group or null if not found.
-
constructRootGroup
Deprecated.Creates a hierarchical group structure and moves the data group body to the inner most group. This method is only guaranteed to work correctly if there is exactly one data-group.- Returns:
- the constructed group.
-
installIntoReport
public void installIntoReport(AbstractReportDefinition report) throws org.pentaho.reporting.libraries.xmlns.parser.ParseException Deprecated.- Throws:
org.pentaho.reporting.libraries.xmlns.parser.ParseException
-