/** * Constructs an unnamed function. Make sure to set a Name or function initialisation will fail. */ public ItemSumFunction() { sum = new Sequence<BigDecimal>(); }
/** * Constructs an unnamed function. Make sure to set a Name or function initialisation will fail. */ public ItemMaxFunction() { max = new Sequence<Comparable>(); }
/** * DefaultConstructor. */ public CountDistinctFunction() { values = new Sequence<HashSet<Object>>(); }
protected void clear() { result = new Sequence<Integer>(); lastGroupSequenceNumber = 0; }
/** * Constructs an unnamed function. Make sure to set a Name or function initialisation will fail. */ public ItemMinFunction() { min = new Sequence<Comparable>(); }
/** * Constructs an unnamed function. * <P> * This constructor is intended for use by the SAX handler class only. */ public ItemCountFunction() { count = new Sequence<BigDecimal>(); }
protected void clear() { result = new Sequence<>(); lastGroupSequenceNumber = ZERO_I; }
/** * Receives notification that the report has started. * * @param event * the event. */ public void reportInitialized( final ReportEvent event ) { globalStateKey = event.getState().getProcessKey(); if ( FunctionUtilities.isDefinedPrepareRunLevel( this, event ) ) { result = new Sequence<Object>(); results.clear(); results.put( globalStateKey, result ); lastGroupSequenceNumber = 0; } else { result = results.get( globalStateKey ); lastGroupSequenceNumber = 0; } }
/** * Receives notification that a group has started. * * @param event * the event. */ public void groupStarted( final ReportEvent event ) { if ( FunctionUtilities.isDefinedGroup( getGroup(), event ) ) { final ReportStateKey groupStateKey = event.getState().getProcessKey(); if ( FunctionUtilities.isDefinedPrepareRunLevel( this, event ) ) { result = new Sequence<Object>(); lastGroupSequenceNumber = 0; results.put( globalStateKey, result ); results.put( groupStateKey, result ); } else { // Activate the current group, which was filled in the prepare run. result = results.get( groupStateKey ); } } if ( FunctionUtilities.isDefinedGroup( getCrosstabFilterGroup(), event ) ) { final int groupIndex = event.getState().getCurrentGroupIndex(); this.lastGroupSequenceNumber = (int) event.getState().getCrosstabColumnSequenceCounter( groupIndex ); } }
/** * Receives notification that the report has started. * * @param event the event. */ public void reportInitialized( final ReportEvent event ) { globalStateKey = event.getState().getProcessKey(); if ( FunctionUtilities.isDefinedPrepareRunLevel( this, event ) ) { result = new Sequence<>(); stateSequence.clear(); stateSequence.add( globalStateKey, result ); lastGroupSequenceNumber = ZERO_I; } else { if ( stateSequence.resultExists() ) { result = stateSequence.getResult( ZERO_I ); } else { result = null; } lastGroupSequenceNumber = ZERO_I; } }
/** * Receives notification that the report has started. * * @param event the event. */ public void reportInitialized( final ReportEvent event ) { globalStateKey = event.getState().getProcessKey(); if ( isPrepareRunLevel( event ) ) { result = new Sequence<>(); stateSequence.clear(); stateSequence.add( globalStateKey, result ); lastGroupSequenceNumber = 0; } else { if ( stateSequence.resultExists() ) { result = stateSequence.getResult( 0 ); } else { result = null; } lastGroupSequenceNumber = 0; } }
/** * Receives notification that the report has started. * * @param event the event. */ public void reportInitialized( final ReportEvent event ) { globalStateKey = event.getState().getProcessKey(); if ( FunctionUtilities.isDefinedPrepareRunLevel( this, event ) ) { result = new Sequence<>(); stateSequence.clear(); stateSequence.add( globalStateKey, result ); lastGroupSequenceNumber = ZERO_I; } else { if ( stateSequence.resultExists() ) { result = stateSequence.getResult( ZERO_I ); } else { result = null; } lastGroupSequenceNumber = ZERO_I; } }
/** * Receives notification that the report has started. * * @param event the event. */ public void reportInitialized( final ReportEvent event ) { globalStateKey = event.getState().getProcessKey(); if ( isPrepareRunLevel( event ) ) { result = new Sequence<>(); stateSequence.clear(); stateSequence.add( globalStateKey, result ); lastGroupSequenceNumber = ZERO_I; } else { if ( stateSequence.resultExists() ) { result = stateSequence.getResult( ZERO_I ); } else { result = null; } lastGroupSequenceNumber = ZERO_I; } }
/** * Receives notification that a group has started. * * @param event the event. */ public void groupStarted( final ReportEvent event ) { if ( FunctionUtilities.isDefinedGroup( getGroup(), event ) ) { final ReportStateKey groupStateKey = event.getState().getProcessKey(); if ( FunctionUtilities.isDefinedPrepareRunLevel( this, event ) ) { result = new Sequence<>(); lastGroupSequenceNumber = ZERO_I; stateSequence.add( globalStateKey, result ); stateSequence.add( groupStateKey, result ); } else { // Activate the current group, which was filled in the prepare run. int found = this.stateSequence.getKeyIndex( groupStateKey ); if ( found < ZERO_I ) { result = null; } else { result = stateSequence.getResult( found ); } } } if ( FunctionUtilities.isDefinedGroup( getCrosstabFilterGroup(), event ) ) { final int groupIndex = event.getState().getCurrentGroupIndex(); this.lastGroupSequenceNumber = (int) event.getState().getCrosstabColumnSequenceCounter( groupIndex ); } }
/** * Receives notification that a group has started. * * @param event the event. */ public void groupStarted( final ReportEvent event ) { if ( FunctionUtilities.isDefinedGroup( getGroup(), event ) ) { final ReportStateKey groupStateKey = event.getState().getProcessKey(); if ( FunctionUtilities.isDefinedPrepareRunLevel( this, event ) ) { result = new Sequence<>(); lastGroupSequenceNumber = ZERO_I; stateSequence.add( globalStateKey, result ); stateSequence.add( groupStateKey, result ); } else { // Activate the current group, which was filled in the prepare run. int found = this.stateSequence.getKeyIndex( groupStateKey ); if ( found < ZERO_I ) { result = null; } else { result = stateSequence.getResult( found ); } } } if ( FunctionUtilities.isDefinedGroup( getCrosstabFilterGroup(), event ) ) { final int groupIndex = event.getState().getCurrentGroupIndex(); this.lastGroupSequenceNumber = (int) event.getState().getCrosstabColumnSequenceCounter( groupIndex ); } }