public class JPAProperties extends Object
Modifier and Type | Field and Description |
---|---|
static String |
CACHE_MODE |
static String |
CACHE_RETRIEVE_MODE |
static String |
CACHE_STORE_MODE |
static String |
DATASOURCE |
static String |
DATASOURCE_JTA |
static String |
DATASOURCE_NONJTA |
static String |
JDBC_DRIVER |
static String |
JDBC_PASSWORD |
static String |
JDBC_URL |
static String |
JDBC_USER |
static String |
LOCK_SCOPE |
static String |
LOCK_TIMEOUT |
static String |
PREFIX |
static String |
PROVIDER |
static String |
QUERY_TIMEOUT |
static String |
TRANSACTION_TYPE |
static String |
VALIDATE_FACTORY |
static String |
VALIDATE_GROUP_DEFAULT |
static String |
VALIDATE_MODE |
static String |
VALIDATE_PRE_PERSIST |
static String |
VALIDATE_PRE_REMOVE |
static String |
VALIDATE_PRE_UPDATE |
Constructor and Description |
---|
JPAProperties() |
Modifier and Type | Method and Description |
---|---|
static <T> T |
convertToKernelValue(Class<T> resultType,
String key,
Object value)
Convert the given user value to a value consumable by OpenJPA kernel constructs.
|
static Object |
convertToUserValue(String key,
Object value)
Convert the given kernel value to a value visible to the user.
|
static String |
getBeanProperty(String key)
Gets a bean-style property name from the given key.
|
static <E extends Enum<E>> |
getEnumValue(Class<E> type,
E[] values,
Object val)
Gets a enum value of the given type from the given value.
|
static <E extends Enum<E>> |
getEnumValue(Class<E> type,
E[] values,
String key,
Map<String,Object> prop)
Gets a enum value of the given type from the given properties looking up with the given key.
|
static <E extends Enum<E>> |
getEnumValue(Class<E> type,
Object val)
Gets a enum value of the given type from the given value.
|
static <E extends Enum<E>> |
getEnumValue(Class<E> type,
String key,
Map<String,Object> prop)
Get the value of the given key from the given properties after converting it to the given
enumerated value.
|
static boolean |
isValidKey(String key)
Is the given key appears to be a valid JPA specification defined key?
|
public static final String PREFIX
public static final String PROVIDER
public static final String TRANSACTION_TYPE
public static final String DATASOURCE
public static final String DATASOURCE_JTA
public static final String DATASOURCE_NONJTA
public static final String JDBC_DRIVER
public static final String JDBC_URL
public static final String JDBC_USER
public static final String JDBC_PASSWORD
public static final String LOCK_SCOPE
public static final String LOCK_TIMEOUT
public static final String QUERY_TIMEOUT
public static final String CACHE_MODE
public static final String CACHE_STORE_MODE
public static final String CACHE_RETRIEVE_MODE
public static final String VALIDATE_FACTORY
public static final String VALIDATE_MODE
public static final String VALIDATE_PRE_PERSIST
public static final String VALIDATE_PRE_REMOVE
public static final String VALIDATE_PRE_UPDATE
public static final String VALIDATE_GROUP_DEFAULT
public static boolean isValidKey(String key)
javax.persistence.
.
Does not really check all the keys defined in the specification.public static String getBeanProperty(String key)
key
- must begin with JPA property prefix javax.persistence
javax.persistence.
prefix.
Part of string is what appears between DOT character.public static <T> T convertToKernelValue(Class<T> resultType, String key, Object value)
public static Object convertToUserValue(String key, Object value)
public static <E extends Enum<E>> E getEnumValue(Class<E> type, String key, Map<String,Object> prop)
public static <E extends Enum<E>> E getEnumValue(Class<E> type, E[] values, String key, Map<String,Object> prop)
public static <E extends Enum<E>> E getEnumValue(Class<E> type, Object val)
public static <E extends Enum<E>> E getEnumValue(Class<E> type, E[] values, Object val)
Copyright © 2006–2022 Apache Software Foundation. All rights reserved.