org.outerj.xreporter.report.definition
Class GroupingExecutionContext

java.lang.Object
  extended byorg.outerj.xreporter.report.definition.GroupingExecutionContext
All Implemented Interfaces:
ExecutionContext

public class GroupingExecutionContext
extends java.lang.Object
implements ExecutionContext

A wrapper around ExecutionContext used in case of grouping. It forces the orderby to always sort first on the grouping columns.


Field Summary
protected  DatabaseOutputDefinition databaseOutputDefinition
           
protected  ExecutionContext delegateExecutionContext
           
protected  GroupDefinition[] groupDefinitions
           
 
Constructor Summary
GroupingExecutionContext(ExecutionContext delegateExecutionContext, GroupDefinition[] groupDefinitions, DatabaseOutputDefinition databaseOutputDefinition)
           
 
Method Summary
 Columns getColumns()
          Provides access to the Columns configuration.
 DataSource getDataSource()
          Gets the data source of the report instance.
 DataSourceManager getDataSourceManager()
          Gets the data source manager.
 ExpressionContext getExpressionContext()
          Gets the context for evaluating expressions.
 java.lang.String getHostName()
          Return the host name of the server instance this report is running on.
 InputField getInputField(java.lang.String name)
          If the ExecutionContext is a Step, then this will only provide access to InputField's of the current or previous steps.
 java.lang.String getListenerName()
          Return the logical name of the server instance this report is running on.
 java.lang.String getOrderBySql()
          Returns the sql for the currently selected orderby choice, or null if no orderby is configured.
 int getPort()
          Return the port number of the server instance this report is running on.
 Qbe getQbe()
          Provides access to the QBE (Query By Example) configuration.
 java.lang.String getReportDefinitionId()
           
 java.lang.String getReportId()
          Returns the id of the report instance.
 ResourceHandle getResourceHandle()
           
 java.lang.String getTemporaryTableName(java.lang.String name)
          Constructs a temporary table name.
 User getUser()
           
 void registerTemporaryTableName(java.lang.String name)
          Registers a temporary table name for automatic cleanup.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

delegateExecutionContext

protected final ExecutionContext delegateExecutionContext

groupDefinitions

protected final GroupDefinition[] groupDefinitions

databaseOutputDefinition

protected final DatabaseOutputDefinition databaseOutputDefinition
Constructor Detail

GroupingExecutionContext

public GroupingExecutionContext(ExecutionContext delegateExecutionContext,
                                GroupDefinition[] groupDefinitions,
                                DatabaseOutputDefinition databaseOutputDefinition)
Method Detail

getListenerName

public java.lang.String getListenerName()
Description copied from interface: ExecutionContext
Return the logical name of the server instance this report is running on.

Specified by:
getListenerName in interface ExecutionContext

getHostName

public java.lang.String getHostName()
Description copied from interface: ExecutionContext
Return the host name of the server instance this report is running on.

Specified by:
getHostName in interface ExecutionContext

getPort

public int getPort()
Description copied from interface: ExecutionContext
Return the port number of the server instance this report is running on.

Specified by:
getPort in interface ExecutionContext

getInputField

public InputField getInputField(java.lang.String name)
Description copied from interface: ExecutionContext
If the ExecutionContext is a Step, then this will only provide access to InputField's of the current or previous steps.

Specified by:
getInputField in interface ExecutionContext

getTemporaryTableName

public java.lang.String getTemporaryTableName(java.lang.String name)
Description copied from interface: ExecutionContext
Constructs a temporary table name. You should also call ExecutionContext.registerTemporaryTableName(java.lang.String) if this table should be cleaned up automatically by XReporter.

Specified by:
getTemporaryTableName in interface ExecutionContext

registerTemporaryTableName

public void registerTemporaryTableName(java.lang.String name)
Description copied from interface: ExecutionContext
Registers a temporary table name for automatic cleanup. This will only work when the ExecutionContext is a Step. Temporary tables will be cleaned up either if the report instance expires, or if the user goes back to a previous step.

Specified by:
registerTemporaryTableName in interface ExecutionContext

getDataSource

public DataSource getDataSource()
Description copied from interface: ExecutionContext
Gets the data source of the report instance.

Specified by:
getDataSource in interface ExecutionContext

getDataSourceManager

public DataSourceManager getDataSourceManager()
Description copied from interface: ExecutionContext
Gets the data source manager. This allows to access other data sources then the one against which the report instance works.

Specified by:
getDataSourceManager in interface ExecutionContext

getOrderBySql

public java.lang.String getOrderBySql()
Description copied from interface: ExecutionContext
Returns the sql for the currently selected orderby choice, or null if no orderby is configured.

Specified by:
getOrderBySql in interface ExecutionContext

getQbe

public Qbe getQbe()
Description copied from interface: ExecutionContext
Provides access to the QBE (Query By Example) configuration.

Specified by:
getQbe in interface ExecutionContext

getColumns

public Columns getColumns()
Description copied from interface: ExecutionContext
Provides access to the Columns configuration.

Specified by:
getColumns in interface ExecutionContext

getExpressionContext

public ExpressionContext getExpressionContext()
Description copied from interface: ExecutionContext
Gets the context for evaluating expressions. This differs between ReportImpl and Step, because in step expression variables will only be resolved against parameters from previous steps.

Specified by:
getExpressionContext in interface ExecutionContext

getReportId

public java.lang.String getReportId()
Description copied from interface: ExecutionContext
Returns the id of the report instance.

Specified by:
getReportId in interface ExecutionContext

getReportDefinitionId

public java.lang.String getReportDefinitionId()
Specified by:
getReportDefinitionId in interface ExecutionContext

getResourceHandle

public ResourceHandle getResourceHandle()
Specified by:
getResourceHandle in interface ExecutionContext

getUser

public User getUser()
Specified by:
getUser in interface ExecutionContext