public String getName() { final String name = super.getName(); if ( StringUtils.isEmpty( name ) ) { return getGeneratedName(); } else { return name; } }
public boolean matches( final String name ) { if ( ObjectUtilities.equal( name, getName() ) ) { return true; } return ObjectUtilities.equal( name, getGeneratedName() ); }
private void configureRelationalAggreation( final ReportElement element, final AggregationFunction o ) { // relational element ... final String group = (String) element.getAttribute( AttributeNames.Wizard.NAMESPACE, AttributeNames.Wizard.AGGREGATION_GROUP ); if ( group != null ) { o.setGroup( group ); } else { final Group g = findGroup( element ); if ( g != null ) { o.setGroup( g.getGeneratedName() ); } } }
/** * Returns true if the events current groupname is equal to the group name. * * @param groupName * the group name. * @param event * the report event. * @return A boolean. */ public static boolean isDefinedGroup( final String groupName, final ReportEvent event ) { if ( groupName == null ) { return false; } final int groupIndex = event.getState().getCurrentGroupIndex(); final Group group = event.getReport().getGroup( groupIndex ); if ( groupName.equals( group.getName() ) ) { return true; } if ( groupName.equals( group.getGeneratedName() ) ) { return true; } return false; }
public void enterGroup() { recorder.enterGroup(); currentGroupIndex += 1; final Group group = report.getGroup( currentGroupIndex ); groupStarts.push( new GroupStartRecord( getCurrentRow(), group.getName(), group.getGeneratedName() ) ); groupSequenceCounter.increment( currentGroupIndex ); groupSequenceCounter.set( currentGroupIndex + 1, 0 ); if ( groupStarts.size() != currentGroupIndex + 1 ) { throw new IllegalStateException(); } }