org.mule.module.db.internal.processor
Class AbstractDbMessageProcessor

java.lang.Object
  extended by org.mule.processor.AbstractInterceptingMessageProcessorBase
      extended by org.mule.processor.AbstractInterceptingMessageProcessor
          extended by org.mule.module.db.internal.processor.AbstractDbMessageProcessor
All Implemented Interfaces:
AnnotatedObject, MuleContextAware, Initialisable, InterceptingMessageProcessor, MessageProcessor, MessageProcessorContainer, MessageSource, org.mule.common.Capability, org.mule.common.metadata.MetaDataDescriptor, org.mule.common.metadata.OperationMetaDataEnabled
Direct Known Subclasses:
AbstractSingleQueryDbMessageProcessor, BulkExecuteMessageProcessor, PreparedBulkUpdateMessageProcessor

public abstract class AbstractDbMessageProcessor
extends AbstractInterceptingMessageProcessor
implements Initialisable, InterceptingMessageProcessor, org.mule.common.metadata.OperationMetaDataEnabled

Base class for database message processors.


Field Summary
protected  DbConfigResolver dbConfigResolver
           
 
Fields inherited from class org.mule.processor.AbstractInterceptingMessageProcessorBase
logger, muleContext, next, notificationHandler
 
Fields inherited from interface org.mule.api.lifecycle.Initialisable
PHASE_NAME
 
Fields inherited from interface org.mule.api.AnnotatedObject
PROPERTY_NAME
 
Constructor Summary
AbstractDbMessageProcessor(DbConfigResolver dbConfigResolver, TransactionalAction transactionalAction)
           
 
Method Summary
protected abstract  Object executeQuery(DbConnection connection, MuleEvent muleEvent)
           
 org.mule.common.Result<org.mule.common.metadata.MetaData> getInputMetaData()
           
 org.mule.common.Result<org.mule.common.metadata.MetaData> getOutputMetaData(org.mule.common.metadata.MetaData metaData)
           
 QueryMetadataProvider getQueryMetadataProvider()
           
 String getSource()
           
 String getTarget()
           
protected abstract  List<QueryType> getValidQueryTypes()
           
 void initialise()
           
protected  boolean mustCloseConnection()
           
 MuleEvent process(MuleEvent muleEvent)
           
protected  MuleEvent resolveSource(MuleEvent muleEvent)
           
 void setQueryMetadataProvider(QueryMetadataProvider queryMetadataProvider)
           
 void setSource(String source)
           
 void setTarget(String target)
           
protected  void validateQueryType(QueryTemplate queryTemplate)
           
 
Methods inherited from class org.mule.processor.AbstractInterceptingMessageProcessorBase
addMessageProcessorPathElements, getAnnotation, getAnnotations, getListener, getMuleContext, isEventValid, processNext, setAnnotations, setListener, setMuleContext, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.mule.api.source.MessageSource
setListener
 

Field Detail

dbConfigResolver

protected final DbConfigResolver dbConfigResolver
Constructor Detail

AbstractDbMessageProcessor

public AbstractDbMessageProcessor(DbConfigResolver dbConfigResolver,
                                  TransactionalAction transactionalAction)
Method Detail

process

public MuleEvent process(MuleEvent muleEvent)
                  throws MuleException
Specified by:
process in interface MessageProcessor
Throws:
MuleException

mustCloseConnection

protected boolean mustCloseConnection()

resolveSource

protected MuleEvent resolveSource(MuleEvent muleEvent)

executeQuery

protected abstract Object executeQuery(DbConnection connection,
                                       MuleEvent muleEvent)
                                throws SQLException
Throws:
SQLException

initialise

public void initialise()
                throws InitialisationException
Specified by:
initialise in interface Initialisable
Throws:
InitialisationException

setQueryMetadataProvider

public void setQueryMetadataProvider(QueryMetadataProvider queryMetadataProvider)

getQueryMetadataProvider

public QueryMetadataProvider getQueryMetadataProvider()

getOutputMetaData

public org.mule.common.Result<org.mule.common.metadata.MetaData> getOutputMetaData(org.mule.common.metadata.MetaData metaData)
Specified by:
getOutputMetaData in interface org.mule.common.metadata.MetaDataDescriptor

getInputMetaData

public org.mule.common.Result<org.mule.common.metadata.MetaData> getInputMetaData()
Specified by:
getInputMetaData in interface org.mule.common.metadata.MetaDataDescriptor

getSource

public String getSource()

setSource

public void setSource(String source)

getTarget

public String getTarget()

setTarget

public void setTarget(String target)

validateQueryType

protected void validateQueryType(QueryTemplate queryTemplate)

getValidQueryTypes

protected abstract List<QueryType> getValidQueryTypes()


Copyright © 2003–2014 MuleSoft, Inc.. All rights reserved.