com.simba.dsi.ext
Class OperationHandlerFactory

java.lang.Object
  extended by com.simba.dsi.ext.OperationHandlerFactory

public class OperationHandlerFactory
extends java.lang.Object

Defines the "factory" class for creating "handlers" to handle different operations such as aggregation, filtering and JOINs.


Constructor Summary
OperationHandlerFactory()
           
 
Method Summary
 AbstractAggregationHandler createAggregationHandler(DSIExtResultSet resultSet)
          Creates an handler to handle passing down an aggregation.
 AbstractBooleanExprHandler createFilterHandler(DSIExtResultSet resultSet)
          Creates an handler to handle passing down the filters that are relevant to the given input result set.
 AbstractBooleanExprHandler createJoinHandler(DSIExtResultSet resultSet1, DSIExtResultSet resultSet2, int rawJoinType)
          Creates a JOIN condition handler to handle passing down the JOIN operation.
 AbstractBooleanExprHandler createJoinHandler(DSIExtResultSet result1, DSIExtResultSet result2, JoinType joinType)
          Creates a JOIN condition handler to handle passing down the JOIN operation.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OperationHandlerFactory

public OperationHandlerFactory()
Method Detail

createAggregationHandler

public AbstractAggregationHandler createAggregationHandler(DSIExtResultSet resultSet)
Creates an handler to handle passing down an aggregation.

This default implementation always return null to indicate that passing down aggregation is not supported.

Parameters:
resultSet - The input result set to apply aggregation on. It could be a base table or any other result set.
Returns:
An handler object to handle passing down an aggregation if it is supported, NULL otherwise.

createFilterHandler

public AbstractBooleanExprHandler createFilterHandler(DSIExtResultSet resultSet)
Creates an handler to handle passing down the filters that are relevant to the given input result set.

This default implementation always return null to indicate that passing down filters is not supported.

Parameters:
resultSet - The input result set to apply filters on. It could be a base table or any other result set.
Returns:
An handler object to handle passing down filters if it is supported, NULL otherwise.

createJoinHandler

public final AbstractBooleanExprHandler createJoinHandler(DSIExtResultSet resultSet1,
                                                          DSIExtResultSet resultSet2,
                                                          int rawJoinType)
Creates a JOIN condition handler to handle passing down the JOIN operation.

This method finds the right JoinType and calls createJoinHandler(DSIExtResultSet, DSIExtResultSet, JoinType).

Parameters:
resultSet1 - The first table of the join. Cannot be NULL.
resultSet2 - The second table of the join. Cannot be NULL.
rawJoinType - The type of the join being applied.
Returns:
A JOIN condition handler to handle passing down the JOIN operation if the feature is supported, NULL otherwise.

createJoinHandler

public AbstractBooleanExprHandler createJoinHandler(DSIExtResultSet result1,
                                                    DSIExtResultSet result2,
                                                    JoinType joinType)
Creates a JOIN condition handler to handle passing down the JOIN operation.

Note that a join condition handler bears the same interface as a filter handler.

The default implementation in this class returns NULL to indicate that passing down JOINs is not supported.

Parameters:
result1 - The first table of the join. Cannot be NULL.
result2 - The second table of the join. Cannot be NULL.
joinType - The type of the join being applied.
Returns:
A JOIN condition handler to handle passing down the JOIN operation if the feature is supported, NULL otherwise.


Copyright © 2006-2014 Simba Technologies Incorporated. All Rights Reserved.