Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| jBPM distribution 6.0.0.CR4
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.jbpm.process.audit
Class JPAAuditLogService

    java.lang.Object
      org.jbpm.process.audit.JPAAuditLogService

All Implemented Interfaces:
  AuditLogService

    public class JPAAuditLogService

extends Object
implements AuditLogService

The idea here is that we have a entity manager factory (similar to a session factory) that we repeatedly use to generate an entity manager (which is a persistence context) for the specific service command. While ProcessInstanceLog (and other *Log) entities do not contain LOB's (which sometimes necessitate the use of tx's even in read situations), we use transactions here none-the-less, just to be safe. Obviously, if there is already a running transaction present, we don't do anything to it. At the end of every command, we make sure to close the entity manager we've been using -- which also means that we detach any entities that might be associated with the entity manager/persistence context. After all, this is a service which means our philosophy here is to provide a real interface, and not a leaky one.

Constructor Summary
`JPAAuditLogService()`
`JPAAuditLogService(Environment env)`

Method Summary
`void` | `clear()`
`void` | `dispose()`
`protected void` | `finalize()`
`List<ProcessInstanceLog>` | `findActiveProcessInstances(String processId)`
`List<NodeInstanceLog>` | `findNodeInstances(long processInstanceId)`
`List<NodeInstanceLog>` | `findNodeInstances(long processInstanceId, String nodeId)`
`ProcessInstanceLog` | `findProcessInstance(long processInstanceId)`
`List<ProcessInstanceLog>` | `findProcessInstances()` Service methods
`List<ProcessInstanceLog>` | `findProcessInstances(String processId)`
`List<ProcessInstanceLog>` | `findSubProcessInstances(long processInstanceId)`
`List<VariableInstanceLog>` | `findVariableInstances(long processInstanceId)`
`List<VariableInstanceLog>` | `findVariableInstances(long processInstanceId, String variableId)`
`String` | `getPersistenceUnitName()`
`void` | `setEnvironment(Environment env)`
`void` | `setPersistenceUnitName(String persistenceUnitName)`

Methods inherited from class java.lang.Object
`clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### JPAAuditLogService

    public JPAAuditLogService()

### JPAAuditLogService

    public JPAAuditLogService(Environment env)

Method Detail

### setEnvironment

    public void setEnvironment(Environment env)

  Specified by:
    `setEnvironment` in interface `AuditLogService`

### getPersistenceUnitName

    public String getPersistenceUnitName()

  Specified by:
    `getPersistenceUnitName` in interface `AuditLogService`

### setPersistenceUnitName

    public void setPersistenceUnitName(String persistenceUnitName)

  Specified by:
    `setPersistenceUnitName` in interface `AuditLogService`

### findProcessInstances

    public List<ProcessInstanceLog> findProcessInstances()

  Description copied from interface: `AuditLogService`
  Service methods

  Specified by:
    `findProcessInstances` in interface `AuditLogService`
  Returns:

### findProcessInstances

    public List<ProcessInstanceLog> findProcessInstances(String processId)

  Specified by:
    `findProcessInstances` in interface `AuditLogService`

### findActiveProcessInstances

    public List<ProcessInstanceLog> findActiveProcessInstances(String processId)

  Specified by:
    `findActiveProcessInstances` in interface `AuditLogService`

### findProcessInstance

    public ProcessInstanceLog findProcessInstance(long processInstanceId)

  Specified by:
    `findProcessInstance` in interface `AuditLogService`

### findSubProcessInstances

    public List<ProcessInstanceLog> findSubProcessInstances(long processInstanceId)

  Specified by:
    `findSubProcessInstances` in interface `AuditLogService`

### findNodeInstances

    public List<NodeInstanceLog> findNodeInstances(long processInstanceId)

  Specified by:
    `findNodeInstances` in interface `AuditLogService`

### findNodeInstances

    public List<NodeInstanceLog> findNodeInstances(long processInstanceId,
                                                   String nodeId)

  Specified by:
    `findNodeInstances` in interface `AuditLogService`

### findVariableInstances

    public List<VariableInstanceLog> findVariableInstances(long processInstanceId)

  Specified by:
    `findVariableInstances` in interface `AuditLogService`

### findVariableInstances

    public List<VariableInstanceLog> findVariableInstances(long processInstanceId,
                                                           String variableId)

  Specified by:
    `findVariableInstances` in interface `AuditLogService`

### clear

    public void clear()

  Specified by:
    `clear` in interface `AuditLogService`

### dispose

    public void dispose()

  Specified by:
    `dispose` in interface `AuditLogService`

### finalize

    protected void finalize()
                     throws Throwable

  Overrides:
    `finalize` in class `Object`
  Throws:
    `Throwable`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| jBPM distribution 6.0.0.CR4
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2001-2013 JBoss by Red Hat. All Rights Reserved.