org.jboss.seam.persistence
public static enum PersistenceProvider.Feature extends Enum<PersistenceProvider.Feature>
Enum Constant and Description |
---|
WILDCARD_AS_COUNT_QUERY_SUBJECT
Identifies whether this JPA provider supports using a wildcard as the
subject of a count query.
|
Modifier and Type | Method and Description |
---|---|
static PersistenceProvider.Feature |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static PersistenceProvider.Feature[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final PersistenceProvider.Feature WILDCARD_AS_COUNT_QUERY_SUBJECT
Here's a count query that uses a wildcard as the subject.
select count(*) from Vehicle v
Per the JPA 1.0 spec, using a wildcard as a subject of a count query is not permitted. Instead, the subject must be the entity or the alias, as in this count query:
select count(v) from Vehicle v
Hibernate supports the wildcard syntax as an vendor extension. Furthermore, Hibernate produces an invalid SQL query when using the compliant subject if the entity has a composite primary key. Therefore, we prefer to use the wildcard syntax if it is supported.
public static PersistenceProvider.Feature[] values()
for (PersistenceProvider.Feature c : PersistenceProvider.Feature.values()) System.out.println(c);
public static PersistenceProvider.Feature valueOf(String name)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant
with the specified nameNullPointerException
- if the argument is nullCopyright © 2015 Seam Framework. All Rights Reserved.