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:
MessageExchangeDAO

public class MessageExchangeDAOImpl
extends OpenJPADAO
implements MessageExchangeDAO


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(java.lang.String mexId, char direction)
           
 
Method Summary
 void addCorrelationKey(CorrelationKey correlationKey)
           
 MessageDAO createMessage(javax.xml.namespace.QName type)
          Create a new message associated with this message-exchange
 void deleteMessages()
           
 MessageExchange.AckType getAckType()
           
 javax.xml.namespace.QName getCallee()
          Get the "callee"--the id of the service being invoked in a myRole exchange.
 java.lang.String getChannel()
          Get the response channel.
 java.util.Collection<CorrelationKey> getCorrelationKeys()
           
 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()
           
 MessageExchange.FailureType getFailureType()
           
 javax.xml.namespace.QName getFault()
           
 java.lang.String getFaultExplanation()
           
 ProcessInstanceDAO getInstance()
           
 InvocationStyle getInvocationStyle()
          Get the invocation style.
 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 getPartnersKey()
          Get the the partner's identifier for this message exchange.
 MessageExchange.MessageExchangePattern getPattern()
           
 java.lang.String getPipedMessageExchangeId()
          Gets the message exchange that has been piped with this one in a process to process interaction.
 javax.xml.namespace.QName getPipedPID()
           
 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)
 MessageExchange.Status getStatus()
          Get state of last message sent/received.
 long getTimeout()
           
 void release(boolean doClean)
           
 void setAckType(MessageExchange.AckType ackType)
           
 void setCallee(javax.xml.namespace.QName callee)
          Set the "callee"--the id of the service being invoked in a myRole exchange.
 void setChannel(java.lang.String channel)
          Set the response channel.
 void setCorrelationStatus(java.lang.String cstatus)
           
 void setCorrelator(CorrelatorDAOImpl correlator)
           
 void setEPR(org.w3c.dom.Element epr)
           
 void setFailureType(MessageExchange.FailureType failureType)
           
 void setFault(javax.xml.namespace.QName faultType)
           
 void setFaultExplanation(java.lang.String explanation)
           
 void setInstance(ProcessInstanceDAO dao)
           
 void setInvocationStyle(InvocationStyle invocationStyle)
          Set the invocation style.
 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 setPartnersKey(java.lang.String correlationId)
          Set the correlation identifier/client id
 void setPattern(MessageExchange.MessageExchangePattern pattern)
           
 void setPipedMessageExchangeId(java.lang.String pipedMessageExchangeId)
           
 void setPipedPID(javax.xml.namespace.QName pipedPid)
           
 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(MessageExchange.Status status)
          Set state of last message sent/received.
 void setTimeout(long timeout)
           
 
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(java.lang.String mexId,
                              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 service 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.

getPartnersKey

public java.lang.String getPartnersKey()
Description copied from interface: MessageExchangeDAO
Get the the partner's identifier for this message exchange. Generally, the partner will have a different identifier for each exchange. This key is used in sistuations when the partner needs to find the mex, but only has their own identifier.

Specified by:
getPartnersKey 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 MessageExchange.MessageExchangePattern 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()

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 MessageExchange.Status 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 service 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

setPartnersKey

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

Specified by:
setPartnersKey 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(MessageExchange.MessageExchangePattern 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(MessageExchange.Status 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 message exchange that has been piped with this one in a process to process interaction.

Specified by:
getPipedMessageExchangeId in interface MessageExchangeDAO
Returns:
other side of the message pipe

setPipedMessageExchangeId

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

addCorrelationKey

public void addCorrelationKey(CorrelationKey correlationKey)

getCorrelationKeys

public java.util.Collection<CorrelationKey> getCorrelationKeys()

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)

getInvocationStyle

public InvocationStyle getInvocationStyle()
Description copied from interface: MessageExchangeDAO
Get the invocation style.

Specified by:
getInvocationStyle in interface MessageExchangeDAO
Returns:

getTimeout

public long getTimeout()
Specified by:
getTimeout in interface MessageExchangeDAO

setFailureType

public void setFailureType(MessageExchange.FailureType failureType)
Specified by:
setFailureType in interface MessageExchangeDAO

getFailureType

public MessageExchange.FailureType getFailureType()
Specified by:
getFailureType in interface MessageExchangeDAO

setInvocationStyle

public void setInvocationStyle(InvocationStyle invocationStyle)
Description copied from interface: MessageExchangeDAO
Set the invocation style.

Specified by:
setInvocationStyle in interface MessageExchangeDAO

setTimeout

public void setTimeout(long timeout)
Specified by:
setTimeout in interface MessageExchangeDAO

getAckType

public MessageExchange.AckType getAckType()
Specified by:
getAckType in interface MessageExchangeDAO

setAckType

public void setAckType(MessageExchange.AckType ackType)
Specified by:
setAckType in interface MessageExchangeDAO

getPipedPID

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

setPipedPID

public void setPipedPID(javax.xml.namespace.QName pipedPid)
Specified by:
setPipedPID in interface MessageExchangeDAO