Package org.omnifaces.persistence
Enum Provider
- java.lang.Object
-
- java.lang.Enum<Provider>
-
- org.omnifaces.persistence.Provider
-
- All Implemented Interfaces:
Serializable
,Comparable<Provider>
public enum Provider extends Enum<Provider>
Enumeration of all supported JPA providers.
-
-
Enum Constant Summary
Enum Constants Enum Constant Description ECLIPSELINK
HIBERNATE
OPENJPA
UNKNOWN
-
Field Summary
Fields Modifier and Type Field Description static String
QUERY_HINT_ECLIPSELINK_MAINTAIN_CACHE
static String
QUERY_HINT_ECLIPSELINK_REFRESH
static String
QUERY_HINT_HIBERNATE_CACHE_REGION
static String
QUERY_HINT_HIBERNATE_CACHEABLE
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description <I extends Comparable<I> & Serializable,E extends BaseEntity<I>>
EdereferenceProxy(E entity)
String
getDialectName(EntityManagerFactory entityManagerFactory)
<I extends Comparable<I> & Serializable,E extends BaseEntity<I>>
Class<E>getEntityType(E entity)
<I extends Comparable<I> & Serializable,E extends BaseEntity<I>>
IgetIdentifier(E entity)
<I extends Comparable<I> & Serializable,E extends BaseEntity<I>>
StringgetTableName(E entity)
static boolean
is(Provider provider)
boolean
isAggregation(Expression<?> expression)
boolean
isElementCollection(Attribute<?,?> attribute)
boolean
isManyOrOneToOne(Attribute<?,?> attribute)
boolean
isOneToMany(Attribute<?,?> attribute)
<I extends Comparable<I> & Serializable,E extends BaseEntity<I>>
booleanisProxy(E entity)
<I extends Comparable<I> & Serializable,E extends BaseEntity<I>>
booleanisProxyUninitialized(E entity)
static Provider
of(EntityManager entityManager)
static Provider
valueOf(String name)
Returns the enum constant of this type with the specified name.static Provider[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Field Detail
-
QUERY_HINT_HIBERNATE_CACHEABLE
public static final String QUERY_HINT_HIBERNATE_CACHEABLE
- See Also:
- Constant Field Values
-
QUERY_HINT_HIBERNATE_CACHE_REGION
public static final String QUERY_HINT_HIBERNATE_CACHE_REGION
- See Also:
- Constant Field Values
-
QUERY_HINT_ECLIPSELINK_MAINTAIN_CACHE
public static final String QUERY_HINT_ECLIPSELINK_MAINTAIN_CACHE
- See Also:
- Constant Field Values
-
QUERY_HINT_ECLIPSELINK_REFRESH
public static final String QUERY_HINT_ECLIPSELINK_REFRESH
- See Also:
- Constant Field Values
-
-
Method Detail
-
values
public static Provider[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (Provider c : Provider.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static Provider valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is null
-
of
public static Provider of(EntityManager entityManager)
-
is
public static boolean is(Provider provider)
-
getDialectName
public String getDialectName(EntityManagerFactory entityManagerFactory)
-
isAggregation
public boolean isAggregation(Expression<?> expression)
-
isElementCollection
public boolean isElementCollection(Attribute<?,?> attribute)
-
isOneToMany
public boolean isOneToMany(Attribute<?,?> attribute)
-
isManyOrOneToOne
public boolean isManyOrOneToOne(Attribute<?,?> attribute)
-
isProxy
public <I extends Comparable<I> & Serializable,E extends BaseEntity<I>> boolean isProxy(E entity)
-
isProxyUninitialized
public <I extends Comparable<I> & Serializable,E extends BaseEntity<I>> boolean isProxyUninitialized(E entity)
-
dereferenceProxy
public <I extends Comparable<I> & Serializable,E extends BaseEntity<I>> E dereferenceProxy(E entity)
-
getEntityType
public <I extends Comparable<I> & Serializable,E extends BaseEntity<I>> Class<E> getEntityType(E entity)
-
getIdentifier
public <I extends Comparable<I> & Serializable,E extends BaseEntity<I>> I getIdentifier(E entity)
-
getTableName
public <I extends Comparable<I> & Serializable,E extends BaseEntity<I>> String getTableName(E entity)
-
-