org.apache.ode.daohib.bpel
Class BpelDAOConnectionImpl

java.lang.Object
  extended by org.apache.ode.daohib.bpel.BpelDAOConnectionImpl
All Implemented Interfaces:
BpelDAOConnection

public class BpelDAOConnectionImpl
extends java.lang.Object
implements BpelDAOConnection

Hibernate-based BpelDAOConnection implementation.


Field Summary
protected  SessionManager _sm
           
 
Constructor Summary
BpelDAOConnectionImpl(SessionManager sm)
           
 
Method Summary
 java.util.List<BpelEvent> bpelEventQuery(InstanceFilter ifilter, BpelEventFilter efilter)
          Execute a query to retrieve the BPEL events matching the criteria.
 java.util.List<java.util.Date> bpelEventTimelineQuery(InstanceFilter ifilter, BpelEventFilter efilter)
          Execute a query for the timeline for BPEL events matching the criteria.
 void close()
           
 MessageExchangeDAO createMessageExchange(java.lang.String mexId, char dir)
          Create a message exchange.
 ProcessDAO createProcess(javax.xml.namespace.QName pid, javax.xml.namespace.QName type, java.lang.String guid, long version)
           
 java.util.Map<java.lang.Long,java.util.Collection<CorrelationSetDAO>> getCorrelationSets(java.util.Collection<ProcessInstanceDAO> instances)
           
 ProcessInstanceDAO getInstance(java.lang.Long instanceId)
          Retrieve a process instance from the database.
 MessageExchangeDAO getMessageExchange(java.lang.String mexId)
           
 ProcessDAO getProcess(javax.xml.namespace.QName processId)
          Return the DAO for a bpel process.
 ProcessManagementDAO getProcessManagement()
          Returns an interface for process and instance management.
 ScopeDAO getScope(java.lang.Long siidl)
          Retrieve a scope instance from the database.
 void insertBpelEvent(BpelEvent event, ProcessDAO process, ProcessInstanceDAO instance)
          Insert a BPEL event into the database.
 java.util.Collection<ProcessInstanceDAO> instanceQuery(InstanceFilter criteria)
          Query instances in the database meeting the requested criteria.
 java.util.Collection<ProcessInstanceDAO> instanceQuery(java.lang.String expression)
           
 int instanceQueryCount(InstanceFilter criteria)
          Query the count of instances in the database meeting the requested criteria.
 void releaseMessageExchange(java.lang.String mexid)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

_sm

protected SessionManager _sm
Constructor Detail

BpelDAOConnectionImpl

public BpelDAOConnectionImpl(SessionManager sm)
Method Detail

createMessageExchange

public MessageExchangeDAO createMessageExchange(java.lang.String mexId,
                                                char dir)
Description copied from interface: BpelDAOConnection
Create a message exchange.

Specified by:
createMessageExchange in interface BpelDAOConnection
Parameters:
mexId - message exchange id (application-assigned)
dir - type of message exchange
Returns:

getMessageExchange

public MessageExchangeDAO getMessageExchange(java.lang.String mexId)
Specified by:
getMessageExchange in interface BpelDAOConnection

releaseMessageExchange

public void releaseMessageExchange(java.lang.String mexid)
Specified by:
releaseMessageExchange in interface BpelDAOConnection

createProcess

public ProcessDAO createProcess(javax.xml.namespace.QName pid,
                                javax.xml.namespace.QName type,
                                java.lang.String guid,
                                long version)
Specified by:
createProcess in interface BpelDAOConnection

getProcess

public ProcessDAO getProcess(javax.xml.namespace.QName processId)
Description copied from interface: BpelDAOConnection
Return the DAO for a bpel process.

Specified by:
getProcess in interface BpelDAOConnection
Parameters:
processId - name (identifier) of the process
Returns:
DAO

close

public void close()
Specified by:
close in interface BpelDAOConnection

getInstance

public ProcessInstanceDAO getInstance(java.lang.Long instanceId)
Description copied from interface: BpelDAOConnection
Retrieve a process instance from the database.

Specified by:
getInstance in interface BpelDAOConnection
Parameters:
instanceId - instance identifier
Returns:
process instance
See Also:
ProcessDAO.getInstance(java.lang.Long)

getScope

public ScopeDAO getScope(java.lang.Long siidl)
Description copied from interface: BpelDAOConnection
Retrieve a scope instance from the database.

Specified by:
getScope in interface BpelDAOConnection
Parameters:
siidl - scope instance identifier
Returns:
scope instance

instanceQuery

public java.util.Collection<ProcessInstanceDAO> instanceQuery(InstanceFilter criteria)
Description copied from interface: BpelDAOConnection
Query instances in the database meeting the requested criteria.

Specified by:
instanceQuery in interface BpelDAOConnection
Returns:
Collection

instanceQueryCount

public int instanceQueryCount(InstanceFilter criteria)
Description copied from interface: BpelDAOConnection
Query the count of instances in the database meeting the requested criteria.

Specified by:
instanceQueryCount in interface BpelDAOConnection
Returns:
Collection

insertBpelEvent

public void insertBpelEvent(BpelEvent event,
                            ProcessDAO process,
                            ProcessInstanceDAO instance)
Description copied from interface: BpelDAOConnection
Insert a BPEL event into the database.

Specified by:
insertBpelEvent in interface BpelDAOConnection
Parameters:
event - a BPEL event
process - associated process (optional)
instance - associated instance (optional)

bpelEventTimelineQuery

public java.util.List<java.util.Date> bpelEventTimelineQuery(InstanceFilter ifilter,
                                                             BpelEventFilter efilter)
Description copied from interface: BpelDAOConnection
Execute a query for the timeline for BPEL events matching the criteria.

Specified by:
bpelEventTimelineQuery in interface BpelDAOConnection
Parameters:
ifilter - instance filter (optional)
efilter - event filter (optional)
Returns:
List of event timestamps of events matching the criteria

bpelEventQuery

public java.util.List<BpelEvent> bpelEventQuery(InstanceFilter ifilter,
                                                BpelEventFilter efilter)
Description copied from interface: BpelDAOConnection
Execute a query to retrieve the BPEL events matching the criteria.

Specified by:
bpelEventQuery in interface BpelDAOConnection
Parameters:
ifilter - instance filter
efilter - event filter
Returns:

instanceQuery

public java.util.Collection<ProcessInstanceDAO> instanceQuery(java.lang.String expression)
Specified by:
instanceQuery in interface BpelDAOConnection
See Also:
BpelDAOConnection.instanceQuery(String)

getCorrelationSets

public java.util.Map<java.lang.Long,java.util.Collection<CorrelationSetDAO>> getCorrelationSets(java.util.Collection<ProcessInstanceDAO> instances)
Specified by:
getCorrelationSets in interface BpelDAOConnection

getProcessManagement

public ProcessManagementDAO getProcessManagement()
Description copied from interface: BpelDAOConnection
Returns an interface for process and instance management.

Specified by:
getProcessManagement in interface BpelDAOConnection
Returns:
a ProcessManagement DAO