org.apache.ode.dao.jpa
Class MessageExchangeDAOImpl

java.lang.Object
  extended by org.apache.ode.dao.jpa.OpenJPADAO
      extended by org.apache.ode.dao.jpa.MessageExchangeDAOImpl
All Implemented Interfaces:
CorrelatorMessageDAO, MessageExchangeDAO

public class MessageExchangeDAOImpl
extends OpenJPADAO
implements MessageExchangeDAO, CorrelatorMessageDAO


Field Summary
static java.lang.String DELETE_MEXS_BY_PROCESS
           
static java.lang.String SELECT_MEX_IDS_BY_PROCESS
           
 
Fields inherited from interface org.apache.ode.bpel.dao.MessageExchangeDAO
DIR_BPEL_INVOKES_PARTNERROLE, DIR_PARTNER_INVOKES_MYROLE
 
Constructor Summary
MessageExchangeDAOImpl()
           
MessageExchangeDAOImpl(char direction)
           
 
Method Summary
 MessageDAO createMessage(javax.xml.namespace.QName type)
          Create a new message associated with this message-exchange
 void deleteMessages()
           
 javax.xml.namespace.QName getCallee()
          Get the "callee"--the id of the process being invoked in a myRole exchange.
 java.lang.String getChannel()
          Get the response channel.
 java.lang.String getCorrelationId()
          Get the correlation identifier/client id
 CorrelationKey getCorrelationKey()
           
 java.lang.String getCorrelationStatus()
           
 CorrelatorDAOImpl getCorrelator()
           
 java.util.Date getCreateTime()
          Creation time of the message exchange
 char getDirection()
          Get the direction of the message exchange.
 org.w3c.dom.Element getEPR()
           
 javax.xml.namespace.QName getFault()
           
 java.lang.String getFaultExplanation()
           
 ProcessInstanceDAO getInstance()
           
 java.lang.String getMessageExchangeId()
          Instance id of the message exchange.
 java.lang.String getOperation()
          Get the operation name of this message exchange.
 PartnerLinkDAO getPartnerLink()
           
 int getPartnerLinkModelId()
          Get the model id for the partner link to which this message exchange relates.
 java.lang.String getPattern()
           
 java.lang.String getPipedMessageExchangeId()
          Gets the mex id for the message exchange that has been piped with this one in a process to process interaction.
 javax.xml.namespace.QName getPortType()
          The qualified name of the WSDL port type.
 ProcessDAO getProcess()
          Get the process associate with this message exchange.
 boolean getPropagateTransactionFlag()
           
 java.lang.String getProperty(java.lang.String key)
           
 java.util.Set<java.lang.String> getPropertyNames()
           
 MessageDAO getRequest()
          Get the input message.
 MessageDAO getResponse()
          Get output message (could be fault message)
 java.lang.String getStatus()
          Get state of last message sent/received.
 int getSubscriberCount()
           
 void incrementSubscriberCount()
           
 void release()
           
 void release(boolean doClean)
           
 void setCallee(javax.xml.namespace.QName callee)
          Set the "callee"--the id of the process being invoked in a myRole exchange.
 void setChannel(java.lang.String channel)
          Set the response channel.
 void setCorrelationId(java.lang.String correlationId)
          Set the correlation identifier/client id
 void setCorrelationKey(CorrelationKey ckey)
           
 void setCorrelationStatus(java.lang.String cstatus)
           
 void setCorrelator(CorrelatorDAOImpl correlator)
           
 void setEPR(org.w3c.dom.Element epr)
           
 void setFault(javax.xml.namespace.QName faultType)
           
 void setFaultExplanation(java.lang.String explanation)
           
 void setInstance(ProcessInstanceDAO dao)
           
 void setOperation(java.lang.String opname)
           
 void setPartnerLink(PartnerLinkDAO plinkDAO)
           
 void setPartnerLinkModelId(int modelId)
          Set the model id for the partner link to which this message exchange relates
 void setPattern(java.lang.String pattern)
           
 void setPipedMessageExchangeId(java.lang.String pipedMessageExchangeId)
           
 void setPortType(javax.xml.namespace.QName porttype)
          Set the port type.
 void setProcess(ProcessDAO process)
           
 void setProperty(java.lang.String key, java.lang.String value)
           
 void setRequest(MessageDAO msg)
          Creates an input message DAO.
 void setResponse(MessageDAO msg)
          Creates an output message DAO.
 void setStatus(java.lang.String status)
          Set state of last message sent/received.
 void setSubscriberCount(int subscriberCount)
           
 
Methods inherited from class org.apache.ode.dao.jpa.OpenJPADAO
batchUpdateByIds, getConn, getEM, getSingleResult
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DELETE_MEXS_BY_PROCESS

public static final java.lang.String DELETE_MEXS_BY_PROCESS
See Also:
Constant Field Values

SELECT_MEX_IDS_BY_PROCESS

public static final java.lang.String SELECT_MEX_IDS_BY_PROCESS
See Also:
Constant Field Values
Constructor Detail

MessageExchangeDAOImpl

public MessageExchangeDAOImpl()

MessageExchangeDAOImpl

public MessageExchangeDAOImpl(char direction)
Method Detail

createMessage

public MessageDAO createMessage(javax.xml.namespace.QName type)
Description copied from interface: MessageExchangeDAO
Create a new message associated with this message-exchange

Specified by:
createMessage in interface MessageExchangeDAO
Parameters:
type - message type
Returns:
new MessageDAO

getCallee

public javax.xml.namespace.QName getCallee()
Description copied from interface: MessageExchangeDAO
Get the "callee"--the id of the process being invoked in a myRole exchange.

Specified by:
getCallee in interface MessageExchangeDAO
Returns:

getChannel

public java.lang.String getChannel()
Description copied from interface: MessageExchangeDAO
Get the response channel.

Specified by:
getChannel in interface MessageExchangeDAO
Returns:
response channel.

getCorrelationId

public java.lang.String getCorrelationId()
Description copied from interface: MessageExchangeDAO
Get the correlation identifier/client id

Specified by:
getCorrelationId in interface MessageExchangeDAO
Returns:
correlation identifier

getCorrelationStatus

public java.lang.String getCorrelationStatus()
Specified by:
getCorrelationStatus in interface MessageExchangeDAO

getCreateTime

public java.util.Date getCreateTime()
Description copied from interface: MessageExchangeDAO
Creation time of the message exchange

Specified by:
getCreateTime in interface MessageExchangeDAO
Returns:
create time

getDirection

public char getDirection()
Description copied from interface: MessageExchangeDAO
Get the direction of the message exchange.

Specified by:
getDirection in interface MessageExchangeDAO
Returns:

getEPR

public org.w3c.dom.Element getEPR()
Specified by:
getEPR in interface MessageExchangeDAO

getFault

public javax.xml.namespace.QName getFault()
Specified by:
getFault in interface MessageExchangeDAO

getFaultExplanation

public java.lang.String getFaultExplanation()
Specified by:
getFaultExplanation in interface MessageExchangeDAO

getInstance

public ProcessInstanceDAO getInstance()
Specified by:
getInstance in interface MessageExchangeDAO

getMessageExchangeId

public java.lang.String getMessageExchangeId()
Description copied from interface: MessageExchangeDAO
Instance id of the message exchange.

Specified by:
getMessageExchangeId in interface MessageExchangeDAO
Returns:
message exchange id.

getOperation

public java.lang.String getOperation()
Description copied from interface: MessageExchangeDAO
Get the operation name of this message exchange.

Specified by:
getOperation in interface MessageExchangeDAO
Returns:
operation name.

getPartnerLink

public PartnerLinkDAO getPartnerLink()
Specified by:
getPartnerLink in interface MessageExchangeDAO

getPartnerLinkModelId

public int getPartnerLinkModelId()
Description copied from interface: MessageExchangeDAO
Get the model id for the partner link to which this message exchange relates.

Specified by:
getPartnerLinkModelId in interface MessageExchangeDAO
Returns:

getPattern

public java.lang.String getPattern()
Specified by:
getPattern in interface MessageExchangeDAO

getPortType

public javax.xml.namespace.QName getPortType()
Description copied from interface: MessageExchangeDAO
The qualified name of the WSDL port type.

Specified by:
getPortType in interface MessageExchangeDAO
Returns:
port type name

getProcess

public ProcessDAO getProcess()
Description copied from interface: MessageExchangeDAO
Get the process associate with this message exchange. The process should always be available for partnerRole message exchanges. However, for myRole message exchanges, it is possible that no process is associated with the message exchange (i.e. if the EPR routing fails).

Specified by:
getProcess in interface MessageExchangeDAO
Returns:
process associated with the message exchange

getPropagateTransactionFlag

public boolean getPropagateTransactionFlag()
Specified by:
getPropagateTransactionFlag in interface MessageExchangeDAO

getProperty

public java.lang.String getProperty(java.lang.String key)
Specified by:
getProperty in interface MessageExchangeDAO

getPropertyNames

public java.util.Set<java.lang.String> getPropertyNames()
Specified by:
getPropertyNames in interface MessageExchangeDAO

getRequest

public MessageDAO getRequest()
Description copied from interface: MessageExchangeDAO
Get the input message.

Specified by:
getRequest in interface MessageExchangeDAO
Returns:
input message DAO

getResponse

public MessageDAO getResponse()
Description copied from interface: MessageExchangeDAO
Get output message (could be fault message)

Specified by:
getResponse in interface MessageExchangeDAO
Returns:
output message DAO

getStatus

public java.lang.String getStatus()
Description copied from interface: MessageExchangeDAO
Get state of last message sent/received.

Specified by:
getStatus in interface MessageExchangeDAO
Returns:
the state

setCallee

public void setCallee(javax.xml.namespace.QName callee)
Description copied from interface: MessageExchangeDAO
Set the "callee"--the id of the process being invoked in a myRole exchange.

Specified by:
setCallee in interface MessageExchangeDAO

setChannel

public void setChannel(java.lang.String channel)
Description copied from interface: MessageExchangeDAO
Set the response channel.

Specified by:
setChannel in interface MessageExchangeDAO
Parameters:
channel - response channel

setCorrelationId

public void setCorrelationId(java.lang.String correlationId)
Description copied from interface: MessageExchangeDAO
Set the correlation identifier/client id

Specified by:
setCorrelationId in interface MessageExchangeDAO
Parameters:
correlationId - identifier

setCorrelationStatus

public void setCorrelationStatus(java.lang.String cstatus)
Specified by:
setCorrelationStatus in interface MessageExchangeDAO

setEPR

public void setEPR(org.w3c.dom.Element epr)
Specified by:
setEPR in interface MessageExchangeDAO

setFault

public void setFault(javax.xml.namespace.QName faultType)
Specified by:
setFault in interface MessageExchangeDAO

setFaultExplanation

public void setFaultExplanation(java.lang.String explanation)
Specified by:
setFaultExplanation in interface MessageExchangeDAO

setInstance

public void setInstance(ProcessInstanceDAO dao)
Specified by:
setInstance in interface MessageExchangeDAO

setOperation

public void setOperation(java.lang.String opname)
Specified by:
setOperation in interface MessageExchangeDAO

setPartnerLink

public void setPartnerLink(PartnerLinkDAO plinkDAO)
Specified by:
setPartnerLink in interface MessageExchangeDAO

setPartnerLinkModelId

public void setPartnerLinkModelId(int modelId)
Description copied from interface: MessageExchangeDAO
Set the model id for the partner link to which this message exchange relates

Specified by:
setPartnerLinkModelId in interface MessageExchangeDAO

setPattern

public void setPattern(java.lang.String pattern)
Specified by:
setPattern in interface MessageExchangeDAO

setPortType

public void setPortType(javax.xml.namespace.QName porttype)
Description copied from interface: MessageExchangeDAO
Set the port type.

Specified by:
setPortType in interface MessageExchangeDAO
Parameters:
porttype - port type

setProcess

public void setProcess(ProcessDAO process)
Specified by:
setProcess in interface MessageExchangeDAO

setProperty

public void setProperty(java.lang.String key,
                        java.lang.String value)
Specified by:
setProperty in interface MessageExchangeDAO

setRequest

public void setRequest(MessageDAO msg)
Description copied from interface: MessageExchangeDAO
Creates an input message DAO.

Specified by:
setRequest in interface MessageExchangeDAO

setResponse

public void setResponse(MessageDAO msg)
Description copied from interface: MessageExchangeDAO
Creates an output message DAO.

Specified by:
setResponse in interface MessageExchangeDAO

setStatus

public void setStatus(java.lang.String status)
Description copied from interface: MessageExchangeDAO
Set state of last message sent/received.

Specified by:
setStatus in interface MessageExchangeDAO
Parameters:
status - state to be set

getPipedMessageExchangeId

public java.lang.String getPipedMessageExchangeId()
Description copied from interface: MessageExchangeDAO
Gets the mex id for the message exchange that has been piped with this one in a process to process interaction.

Specified by:
getPipedMessageExchangeId in interface MessageExchangeDAO
Returns:

setPipedMessageExchangeId

public void setPipedMessageExchangeId(java.lang.String pipedMessageExchangeId)
Specified by:
setPipedMessageExchangeId in interface MessageExchangeDAO

getCorrelationKey

public CorrelationKey getCorrelationKey()
Specified by:
getCorrelationKey in interface CorrelatorMessageDAO

setCorrelationKey

public void setCorrelationKey(CorrelationKey ckey)
Specified by:
setCorrelationKey in interface CorrelatorMessageDAO

release

public void release(boolean doClean)
Specified by:
release in interface MessageExchangeDAO

deleteMessages

public void deleteMessages()

getCorrelator

public CorrelatorDAOImpl getCorrelator()

setCorrelator

public void setCorrelator(CorrelatorDAOImpl correlator)

getSubscriberCount

public int getSubscriberCount()
Specified by:
getSubscriberCount in interface MessageExchangeDAO

setSubscriberCount

public void setSubscriberCount(int subscriberCount)
Specified by:
setSubscriberCount in interface MessageExchangeDAO

incrementSubscriberCount

public void incrementSubscriberCount()

release

public void release()