org.jbpm.shared.services.impl

## Class JpaPersistenceContext

- java.lang.Object
- - org.jbpm.shared.services.impl.JpaPersistenceContext

- All Implemented Interfaces:
    org.kie.api.runtime.Context

      public class JpaPersistenceContext
      extends Object
      implements org.kie.api.runtime.Context

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static String` | `FIRST_RESULT`
    `static String` | `MAX_RESULTS`

  - ### Constructor Summary

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

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `HashMap<String,Object>` | `addParametersToMap(Object... parameterValues)`
    `protected void` | `check()`
    `void` | `close(boolean txOwner, boolean emOwner)`
    `int` | `executeUpdateString(String updateString)`
    `int` | `executeUpdateString(String updateString, Map<String,Object> parameters)`
    `<T> T` | `find(Class<T> entityClass, Object primaryKey)`
    `Object` | `get(String identifier)`
    `String` | `getName()`
    `protected javax.persistence.Query` | `getQueryByName(String queryName, Map<String,Object> params)`
    `boolean` | `has(String identifier)`
    `boolean` | `isOpen()`
    `void` | `joinTransaction()`
    `<T> T` | `merge(T entity)`
    `<T> T` | `persist(T object)`
    `<T> T` | `queryAndLockStringWithParametersInTransaction(String queryName, Map<String,Object> params, boolean singleResult, Class<T> clazz)`
    `<T> T` | `queryAndLockWithParametersInTransaction(String queryName, Map<String,Object> params, boolean singleResult, Class<T> clazz)`
    `<T> T` | `queryInTransaction(String queryName, Class<T> clazz)`
    `<T> T` | `queryStringInTransaction(String queryString, Class<T> clazz)`
    `<T> T` | `queryStringWithParametersInTransaction(String queryString, Map<String,Object> params, Class<T> clazz)`
    `<T> T` | `queryWithParametersInTransaction(String queryName, Map<String,Object> params, Class<T> clazz)`
    `void` | `remove(String identifier)`
    `<T> T` | `remove(T entity)`
    `void` | `set(String identifier, Object value)`

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

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

- - ### Field Detail

    - #### FIRST_RESULT

          public static final String FIRST_RESULT

      See Also:
        Constant Field Values

    - #### MAX_RESULTS

          public static final String MAX_RESULTS

      See Also:
        Constant Field Values

  - ### Constructor Detail

    - #### JpaPersistenceContext

          public JpaPersistenceContext(javax.persistence.EntityManager em)

  - ### Method Detail

    - #### getQueryByName

          protected javax.persistence.Query getQueryByName(String queryName,
                                                           Map<String,Object> params)

    - #### queryWithParametersInTransaction

          public <T> T queryWithParametersInTransaction(String queryName,
                                                        Map<String,Object> params,
                                                        Class<T> clazz)

    - #### queryAndLockWithParametersInTransaction

          public <T> T queryAndLockWithParametersInTransaction(String queryName,
                                                               Map<String,Object> params,
                                                               boolean singleResult,
                                                               Class<T> clazz)

    - #### queryInTransaction

          public <T> T queryInTransaction(String queryName,
                                          Class<T> clazz)

    - #### queryStringInTransaction

          public <T> T queryStringInTransaction(String queryString,
                                                Class<T> clazz)

    - #### queryStringWithParametersInTransaction

          public <T> T queryStringWithParametersInTransaction(String queryString,
                                                              Map<String,Object> params,
                                                              Class<T> clazz)

    - #### queryAndLockStringWithParametersInTransaction

          public <T> T queryAndLockStringWithParametersInTransaction(String queryName,
                                                                     Map<String,Object> params,
                                                                     boolean singleResult,
                                                                     Class<T> clazz)

    - #### executeUpdateString

          public int executeUpdateString(String updateString)

    - #### executeUpdateString

          public int executeUpdateString(String updateString,
                                         Map<String,Object> parameters)

    - #### addParametersToMap

          public HashMap<String,Object> addParametersToMap(Object... parameterValues)

    - #### persist

          public <T> T persist(T object)

    - #### find

          public <T> T find(Class<T> entityClass,
                            Object primaryKey)

    - #### remove

          public <T> T remove(T entity)

    - #### merge

          public <T> T merge(T entity)

    - #### isOpen

          public boolean isOpen()

    - #### joinTransaction

          public void joinTransaction()

    - #### close

          public void close(boolean txOwner,
                            boolean emOwner)

    - #### check

          protected void check()

    - #### getName

          public String getName()

      Specified by:
        `getName` in interface `org.kie.api.runtime.Context`

    - #### get

          public Object get(String identifier)

      Specified by:
        `get` in interface `org.kie.api.runtime.Context`

    - #### set

          public void set(String identifier,
                          Object value)

      Specified by:
        `set` in interface `org.kie.api.runtime.Context`

    - #### remove

          public void remove(String identifier)

      Specified by:
        `remove` in interface `org.kie.api.runtime.Context`

    - #### has

          public boolean has(String identifier)

      Specified by:
        `has` in interface `org.kie.api.runtime.Context`

Copyright © 2001–2017 JBoss by Red Hat. All rights reserved.