org.jboss.seam.persistence
Enum PersistenceProvider.Feature

java.lang.Object
  extended by java.lang.Enum<PersistenceProvider.Feature>
      extended by org.jboss.seam.persistence.PersistenceProvider.Feature
All Implemented Interfaces:
Serializable, Comparable<PersistenceProvider.Feature>
Enclosing class:
PersistenceProvider

public static enum PersistenceProvider.Feature
extends Enum<PersistenceProvider.Feature>


Enum Constant Summary
WILDCARD_AS_COUNT_QUERY_SUBJECT
          Identifies whether this JPA provider supports using a wildcard as the subject of a count query.
 
Method Summary
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're declared.
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

WILDCARD_AS_COUNT_QUERY_SUBJECT

public static final PersistenceProvider.Feature WILDCARD_AS_COUNT_QUERY_SUBJECT
Identifies whether this JPA provider supports using a wildcard as the subject of a count query.

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.

Method Detail

values

public static final PersistenceProvider.Feature[] values()
Returns an array containing the constants of this enum type, in the order they're declared. This method may be used to iterate over the constants as follows:
for(PersistenceProvider.Feature c : PersistenceProvider.Feature.values())
        System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they're declared

valueOf

public static PersistenceProvider.Feature 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 name