org.sql.generation.implementation.transformation
Class DefaultSQLProcessor

java.lang.Object
  extended by org.atp.spi.InteractionMapper<BaseType,InteractionType>
      extended by org.atp.spi.ThreadSafeInteractionMapper<org.atp.api.Typeable<?>,SQLProcessor>
          extended by org.sql.generation.implementation.transformation.DefaultSQLProcessor
All Implemented Interfaces:
SQLProcessorAggregator
Direct Known Subclasses:
MySQLProcessor, PostgreSQLProcessor

public class DefaultSQLProcessor
extends org.atp.spi.ThreadSafeInteractionMapper<org.atp.api.Typeable<?>,SQLProcessor>
implements SQLProcessorAggregator

This is base class for processing the SQL syntax elements defined in API. It contains the default processors for nearly all default syntax elements, and a way to easily extend this class in order to add custom processors, or replace default processors with custom ones.

Author:
Stanislav Muhametsin

Nested Class Summary
 
Nested classes/interfaces inherited from class org.atp.spi.InteractionMapper
org.atp.spi.InteractionMapper.AlreadyContainsInteractionStrategy<InteractionType>, org.atp.spi.InteractionMapper.DoesNotContainInteractionStrategy<InteractionType>
 
Field Summary
 
Fields inherited from class org.atp.spi.InteractionMapper
THROW_IF_CONTAINS, THROW_IF_NOT_CONTAINS
 
Constructor Summary
DefaultSQLProcessor()
           
DefaultSQLProcessor(Map<Class<? extends org.atp.api.Typeable<?>>,SQLProcessor> processors)
           
 
Method Summary
static Map<Class<? extends BinaryPredicate>,String> getDefaultBinaryOperators()
           
static Map<Class<? extends MultiPredicate>,String> getDefaultMultiOperators()
           
static Map<Class<? extends MultiPredicate>,String> getDefaultMultiSeparators()
           
static Map<Class<? extends MultiPredicate>,Boolean> getDefaultParenthesisPolicies()
           
static Map<Class<? extends org.atp.api.Typeable<?>>,SQLProcessor> getDefaultProcessors()
           
static Map<Class<? extends UnaryPredicate>,String> getDefaultUnaryOperators()
           
static Map<Class<? extends UnaryPredicate>,BooleanExpressionProcessing.UnaryPredicateProcessor.UnaryOperatorOrientation> getDefaultUnaryOrientations()
           
 void process(org.atp.api.Typeable<?> object, StringBuilder builder)
           
 
Methods inherited from class org.atp.spi.ThreadSafeInteractionMapper
associate, getInteraction, getLock
 
Methods inherited from class org.atp.spi.InteractionMapper
associate, getInteraction
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultSQLProcessor

public DefaultSQLProcessor()

DefaultSQLProcessor

public DefaultSQLProcessor(Map<Class<? extends org.atp.api.Typeable<?>>,SQLProcessor> processors)
Method Detail

process

public void process(org.atp.api.Typeable<?> object,
                    StringBuilder builder)
Specified by:
process in interface SQLProcessorAggregator

getDefaultProcessors

public static Map<Class<? extends org.atp.api.Typeable<?>>,SQLProcessor> getDefaultProcessors()

getDefaultBinaryOperators

public static Map<Class<? extends BinaryPredicate>,String> getDefaultBinaryOperators()

getDefaultMultiOperators

public static Map<Class<? extends MultiPredicate>,String> getDefaultMultiOperators()

getDefaultMultiSeparators

public static Map<Class<? extends MultiPredicate>,String> getDefaultMultiSeparators()

getDefaultParenthesisPolicies

public static Map<Class<? extends MultiPredicate>,Boolean> getDefaultParenthesisPolicies()

getDefaultUnaryOperators

public static Map<Class<? extends UnaryPredicate>,String> getDefaultUnaryOperators()

getDefaultUnaryOrientations

public static Map<Class<? extends UnaryPredicate>,BooleanExpressionProcessing.UnaryPredicateProcessor.UnaryOperatorOrientation> getDefaultUnaryOrientations()


Copyright © 2010. All Rights Reserved.