org.apache.ode.dao.jpa
Class CorrelatorDAOImpl

java.lang.Object
  extended by org.apache.ode.dao.jpa.OpenJPADAO
      extended by org.apache.ode.dao.jpa.CorrelatorDAOImpl
All Implemented Interfaces:
CorrelatorDAO

public class CorrelatorDAOImpl
extends OpenJPADAO
implements CorrelatorDAO


Field Summary
static java.lang.String DELETE_CORRELATORS_BY_PROCESS
           
 
Constructor Summary
CorrelatorDAOImpl()
           
CorrelatorDAOImpl(java.lang.String correlatorKey, ProcessDAOImpl process)
           
 
Method Summary
 void addRoute(java.lang.String routeGroupId, ProcessInstanceDAO target, int index, CorrelationKey correlationKey)
          Add a route from the given correlation key to the given process instance.
 MessageExchangeDAO dequeueMessage(CorrelationKey correlationKey)
          Dequeue a message exchange matching a correlationKey constraint.
 void enqueueMessage(MessageExchangeDAO mex, CorrelationKey[] correlationKeys)
          Enqueue a message exchange to the queue with a set of correlation keys.
 MessageRouteDAO findRoute(CorrelationKey correlationKey)
          Find a route matching the given correlation key.
 java.lang.String getCorrelatorId()
          Get the correlator identifier.
 void removeRoutes(java.lang.String routeGroupId, ProcessInstanceDAO target)
          Remove all routes with the given route-group identifier.
 
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_CORRELATORS_BY_PROCESS

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

CorrelatorDAOImpl

public CorrelatorDAOImpl()

CorrelatorDAOImpl

public CorrelatorDAOImpl(java.lang.String correlatorKey,
                         ProcessDAOImpl process)
Method Detail

addRoute

public void addRoute(java.lang.String routeGroupId,
                     ProcessInstanceDAO target,
                     int index,
                     CorrelationKey correlationKey)
Description copied from interface: CorrelatorDAO
Add a route from the given correlation key to the given process instance.

Specified by:
addRoute in interface CorrelatorDAO
Parameters:
routeGroupId - identifier of the group of routes to which this route belongs
target - target process instance
index - relative order in which the route should be considered
correlationKey - correlation key to match

dequeueMessage

public MessageExchangeDAO dequeueMessage(CorrelationKey correlationKey)
Description copied from interface: CorrelatorDAO
Dequeue a message exchange matching a correlationKey constraint.

Specified by:
dequeueMessage in interface CorrelatorDAO
Parameters:
correlationKey - correlation correlationKey constraint
Returns:
opaque message-related data previously enqueued with the given correlation correlationKey

enqueueMessage

public void enqueueMessage(MessageExchangeDAO mex,
                           CorrelationKey[] correlationKeys)
Description copied from interface: CorrelatorDAO
Enqueue a message exchange to the queue with a set of correlation keys.

Specified by:
enqueueMessage in interface CorrelatorDAO
Parameters:
mex - message exchange
correlationKeys - pre-computed set of correlation keys for this message

findRoute

public MessageRouteDAO findRoute(CorrelationKey correlationKey)
Description copied from interface: CorrelatorDAO
Find a route matching the given correlation key.

Specified by:
findRoute in interface CorrelatorDAO
Parameters:
correlationKey - correlation key
Returns:
route matching the given correlation key

getCorrelatorId

public java.lang.String getCorrelatorId()
Description copied from interface: CorrelatorDAO
Get the correlator identifier.

Specified by:
getCorrelatorId in interface CorrelatorDAO
Returns:
correlator identifier

removeRoutes

public void removeRoutes(java.lang.String routeGroupId,
                         ProcessInstanceDAO target)
Description copied from interface: CorrelatorDAO
Remove all routes with the given route-group identifier.

Specified by:
removeRoutes in interface CorrelatorDAO