|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.openjpa.persistence.JPAProperties
public class JPAProperties
Enumerates configuration property keys defined in JPA 2.0 Specification.
Provides static utility functions to read their values from supplied map of properties.
Provides static utility functions to convert them to values that are fit for OpenJPA implementation.
Field Summary | |
---|---|
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 Summary | |
---|---|
JPAProperties()
|
Method Summary | ||
---|---|---|
static
|
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
|
getEnumValue(Class<E> type,
E[] values,
Object val)
Gets a enum value of the given type from the given value. |
|
static
|
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
|
getEnumValue(Class<E> type,
Object val)
Gets a enum value of the given type from the given value. |
|
static
|
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? |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
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
Constructor Detail |
---|
public JPAProperties()
Method Detail |
---|
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)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |