org.keycloak.connections.jpa.util

## Class JpaUtils

- java.lang.Object
- - org.keycloak.connections.jpa.util.JpaUtils

-     public class JpaUtils
      extends Object

  Author:
    Marek Posolda

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static String` | `HIBERNATE_DEFAULT_SCHEMA`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `JpaUtils()`

  - ### Method Summary

    All Methods Static Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static javax.persistence.EntityManagerFactory` | `createEntityManagerFactory(KeycloakSession session, String unitName, Map<String,Object> properties, boolean jta)`
    `static String` | `getCustomChangelogTableName(String jpaEntityProviderFactoryId)` Get the name of custom table for liquibase updates for give ID of JpaEntityProvider
    `static List<Class<?>>` | `getProvidedEntities(KeycloakSession session)` Get a list of all provided entities by looping over all configured entity providers.
    `static String` | `getTableNameForNativeQuery(String tableName, javax.persistence.EntityManager em)`

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

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

- - ### Field Detail

    - #### HIBERNATE_DEFAULT_SCHEMA

          public static final String HIBERNATE_DEFAULT_SCHEMA

      See Also:
        Constant Field Values

  - ### Constructor Detail

    - #### JpaUtils

          public JpaUtils()

  - ### Method Detail

    - #### getTableNameForNativeQuery

          public static String getTableNameForNativeQuery(String tableName,
                                                          javax.persistence.EntityManager em)

    - #### createEntityManagerFactory

          public static javax.persistence.EntityManagerFactory createEntityManagerFactory(KeycloakSession session,
                                                                                          String unitName,
                                                                                          Map<String,Object> properties,
                                                                                          boolean jta)

    - #### getProvidedEntities

          public static List<Class<?>> getProvidedEntities(KeycloakSession session)

      Get a list of all provided entities by looping over all configured entity providers.
      Parameters:
        `session` - the keycloak session
      Returns:
        a list of all provided entities (can be an empty list)

    - #### getCustomChangelogTableName

          public static String getCustomChangelogTableName(String jpaEntityProviderFactoryId)

      Get the name of custom table for liquibase updates for give ID of JpaEntityProvider
      Parameters:
        `jpaEntityProviderFactoryId` -
      Returns:
        table name

Copyright © 2020 JBoss by Red Hat. All rights reserved.