org.apache.ode.dao.jpa

## Class BPELDAOConnectionImpl

- java.lang.Object
- - org.apache.ode.dao.jpa.BPELDAOConnectionImpl

- All Implemented Interfaces:
    BpelDAOConnection

      public class BPELDAOConnectionImpl
      extends java.lang.Object
      implements BpelDAOConnection

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected javax.persistence.EntityManager` | `_em`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `BPELDAOConnectionImpl(javax.persistence.EntityManager em)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `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(char dir)` Create a message exchange.
    `ProcessDAO` | `createProcess(javax.xml.namespace.QName pid, javax.xml.namespace.QName type, java.lang.String guid, long version)`
    `ProcessDAO` | `createTransientProcess(java.io.Serializable id)`
    `void` | `deleteMessageExchange(MessageExchangeDAO mexDao)`
    `java.util.Collection<CorrelationSetDAO>` | `getActiveCorrelationSets()`
    `java.util.Map<java.lang.Long,java.util.Collection<CorrelationSetDAO>>` | `getCorrelationSets(java.util.Collection<ProcessInstanceDAO> instances)`
    `javax.persistence.EntityManager` | `getEntityManager()`
    `ProcessInstanceDAO` | `getInstance(java.lang.Long iid)` Retrieve a process instance from the database.
    `MessageExchangeDAO` | `getMessageExchange(java.lang.String mexid)`
    `int` | `getNumInstances(javax.xml.namespace.QName processId)`
    `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)`
    `void` | `setEntityManger(javax.persistence.EntityManager em)`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### _em

          protected javax.persistence.EntityManager _em

  - ### Constructor Detail

    - #### BPELDAOConnectionImpl

          public BPELDAOConnectionImpl(javax.persistence.EntityManager em)

  - ### Method Detail

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

    - #### 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

    - #### getInstance

          public ProcessInstanceDAO getInstance(java.lang.Long iid)

      Description copied from interface: `BpelDAOConnection`
      Retrieve a process instance from the database.
      Specified by:
        `getInstance` in interface `BpelDAOConnection`
      Parameters:
        `iid` - instance identifier
      Returns:
        process instance

    - #### close

          public void close()

      Specified by:
        `close` in interface `BpelDAOConnection`

    - #### createMessageExchange

          public MessageExchangeDAO createMessageExchange(char dir)

      Description copied from interface: `BpelDAOConnection`
      Create a message exchange.
      Specified by:
        `createMessageExchange` in interface `BpelDAOConnection`
      Parameters:
        `dir` - type of message exchange
      Returns:

    - #### 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`

    - #### createTransientProcess

          public ProcessDAO createTransientProcess(java.io.Serializable id)

      Specified by:
        `createTransientProcess` 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

    - #### getNumInstances

          public int getNumInstances(javax.xml.namespace.QName processId)

      Specified by:
        `getNumInstances` in interface `BpelDAOConnection`

    - #### 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

    - #### 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)

    - #### 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

    - #### instanceQuery

          public java.util.Collection<ProcessInstanceDAO> instanceQuery(java.lang.String expression)

      Specified by:
        `instanceQuery` in interface `BpelDAOConnection`

    - #### setEntityManger

          public void setEntityManger(javax.persistence.EntityManager em)

    - #### getMessageExchange

          public MessageExchangeDAO getMessageExchange(java.lang.String mexid)

      Specified by:
        `getMessageExchange` in interface `BpelDAOConnection`

    - #### deleteMessageExchange

          public void deleteMessageExchange(MessageExchangeDAO mexDao)

    - #### getEntityManager

          public javax.persistence.EntityManager getEntityManager()

    - #### getCorrelationSets

          public java.util.Map<java.lang.Long,java.util.Collection<CorrelationSetDAO>> getCorrelationSets(java.util.Collection<ProcessInstanceDAO> instances)

      Specified by:
        `getCorrelationSets` in interface `BpelDAOConnection`

    - #### getActiveCorrelationSets

          public java.util.Collection<CorrelationSetDAO> getActiveCorrelationSets()

      Specified by:
        `getActiveCorrelationSets` 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