org.apache.camel.bam.processor
Class JpaBamProcessorSupport<T>
java.lang.Object
org.apache.camel.bam.processor.BamProcessorSupport<T>
org.apache.camel.bam.processor.JpaBamProcessorSupport<T>
- All Implemented Interfaces:
- org.apache.camel.Processor
- Direct Known Subclasses:
- JpaBamProcessor
public class JpaBamProcessorSupport<T>
- extends BamProcessorSupport<T>
A base class for JPA based BAM which can use any entity to store the process
instance information which allows derived classes to specialise the process
instance entity.
- Version:
Constructor Summary |
JpaBamProcessorSupport(org.springframework.transaction.support.TransactionTemplate transactionTemplate,
javax.persistence.EntityManagerFactory entityManagerFactory,
org.apache.camel.Expression correlationKeyExpression,
ActivityRules activityRules)
|
JpaBamProcessorSupport(org.springframework.transaction.support.TransactionTemplate transactionTemplate,
javax.persistence.EntityManagerFactory entityManagerFactory,
org.apache.camel.Expression correlationKeyExpression,
ActivityRules activityRules,
Class<T> entitytype)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
JpaBamProcessorSupport
public JpaBamProcessorSupport(org.springframework.transaction.support.TransactionTemplate transactionTemplate,
javax.persistence.EntityManagerFactory entityManagerFactory,
org.apache.camel.Expression correlationKeyExpression,
ActivityRules activityRules,
Class<T> entitytype)
JpaBamProcessorSupport
public JpaBamProcessorSupport(org.springframework.transaction.support.TransactionTemplate transactionTemplate,
javax.persistence.EntityManagerFactory entityManagerFactory,
org.apache.camel.Expression correlationKeyExpression,
ActivityRules activityRules)
getFindByKeyQuery
public String getFindByKeyQuery()
setFindByKeyQuery
public void setFindByKeyQuery(String findByKeyQuery)
getActivityRules
public ActivityRules getActivityRules()
setActivityRules
public void setActivityRules(ActivityRules activityRules)
getKeyPropertyName
public String getKeyPropertyName()
setKeyPropertyName
public void setKeyPropertyName(String keyPropertyName)
getEntityManagerFactory
public javax.persistence.EntityManagerFactory getEntityManagerFactory()
setEntityManagerFactory
public void setEntityManagerFactory(javax.persistence.EntityManagerFactory entityManagerFactory)
isCorrelationKeyIsPrimary
public boolean isCorrelationKeyIsPrimary()
setCorrelationKeyIsPrimary
public void setCorrelationKeyIsPrimary(boolean correlationKeyIsPrimary)
loadEntity
protected T loadEntity(org.apache.camel.Exchange exchange,
Object key)
throws Exception
- Specified by:
loadEntity
in class BamProcessorSupport<T>
- Throws:
Exception
findEntityByCorrelationKey
protected T findEntityByCorrelationKey(Object key)
getKeyType
protected Class<?> getKeyType()
- Specified by:
getKeyType
in class BamProcessorSupport<T>
setKeyProperty
protected void setKeyProperty(T entity,
Object key)
throws Exception
- Sets the key property on the new entity
- Throws:
Exception
setProcessDefinitionProperty
protected void setProcessDefinitionProperty(T entity,
ProcessDefinition processDefinition)
throws Exception
- Throws:
Exception
createEntity
protected T createEntity(org.apache.camel.Exchange exchange,
Object key)
- Create a new instance of the entity for the given key
processEntity
protected void processEntity(org.apache.camel.Exchange exchange,
T entity)
throws Exception
- Specified by:
processEntity
in class BamProcessorSupport<T>
- Throws:
Exception
createFindByKeyQuery
protected String createFindByKeyQuery()
Apache Camel