Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| jBPM distribution 6.1.0.Beta2
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(javax.persistence.EntityManagerFactory emf)`
`JPAAuditLogService(javax.persistence.EntityManagerFactory emf, PersistenceStrategyType type)`
`JPAAuditLogService(Environment env)`
`JPAAuditLogService(Environment env, PersistenceStrategyType type)`

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)`
`List<VariableInstanceLog>` | `findVariableInstancesByName(String variableId, boolean onlyActiveProcesses)`
`List<VariableInstanceLog>` | `findVariableInstancesByNameAndValue(String variableId, String value, boolean onlyActiveProcesses)`
`String` | `getPersistenceUnitName()`
`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,
                              PersistenceStrategyType type)

### JPAAuditLogService

    public JPAAuditLogService(Environment env)

### JPAAuditLogService

    public JPAAuditLogService(javax.persistence.EntityManagerFactory emf)

### JPAAuditLogService

    public JPAAuditLogService(javax.persistence.EntityManagerFactory emf,
                              PersistenceStrategyType type)

Method Detail

### setPersistenceUnitName

    public void setPersistenceUnitName(String persistenceUnitName)

### getPersistenceUnitName

    public String getPersistenceUnitName()

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

### findVariableInstancesByName

    public List<VariableInstanceLog> findVariableInstancesByName(String variableId,
                                                                 boolean onlyActiveProcesses)

  Specified by:
    `findVariableInstancesByName` in interface `AuditLogService`

### findVariableInstancesByNameAndValue

    public List<VariableInstanceLog> findVariableInstancesByNameAndValue(String variableId,
                                                                         String value,
                                                                         boolean onlyActiveProcesses)

  Specified by:
    `findVariableInstancesByNameAndValue` 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.1.0.Beta2
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

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