|
EclipseLink1.0 - 20080707 API Reference | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.eclipse.persistence.config.QueryHints
public class QueryHints
The class defines EclipseLink query hints. These query hints allow a JPA Query to be customized or optimized beyond what is available in the JPA specification.
JPA Query Hint Usage:
query.setHint(QueryHints.CACHE_USAGE, CacheUsage.CheckCacheOnly);
or
@QueryHint(name=QueryHints.CACHE_USAGE, value=CacheUsage.CheckCacheOnly)
Hint values are case-insensitive; "" could be used instead of default value.
HintValues
,
CacheUsage
,
PessimisticLock
,
QueryType
Field Summary | |
---|---|
static java.lang.String |
BATCH
Configures the query to optimize the retrieval of the related objects, the related objects for all the resulting objects will be read in a single query (instead of n queries). |
static java.lang.String |
BIND_PARAMETERS
Configures parameter binding to be disabled or enabled just for this query (overrides persistent unit setting, which default to true). |
static java.lang.String |
CACHE_USAGE
Configures the query to utilize the TopLink cache, by default the cache is not checked on queries before accessing the database. |
static java.lang.String |
FETCH
Configures the query to optimize the retrieval of the related objects, the related objects will be joined into the query instead of being queried independently. |
static java.lang.String |
JDBC_FETCH_SIZE
Configures the JDBC fetch-size for the queries result-set. |
static java.lang.String |
JDBC_MAX_ROWS
Configures the JDBC max-rows, if the query returns more rows than the max-rows the trailing rows will not be returned by the database. |
static java.lang.String |
JDBC_TIMEOUT
Configures the JDBC timeout of the query execution, if the database query exceeds the timeout the database will terminate the query and return an exception. |
static java.lang.String |
PESSIMISTIC_LOCK
Configures the query to acquire a pessimisitc lock (write-lock) on the resulting rows in the database. |
static java.lang.String |
QUERY_REDIRECTOR
Used to provide a Query Redirector to the executing query. |
static java.lang.String |
QUERY_TYPE
Configures the TopLink query type to use for the query. |
static java.lang.String |
READ_ONLY
Configures the query to return shared (read-only) objects from the cache, instead of objects registered with the persistence context. |
static java.lang.String |
REFRESH
Configures the query to refresh the resulting objects in the cache and persistent context with the current state of the database. |
static java.lang.String |
REFRESH_CASCADE
Valid values are all declared in CascadePolicy class. |
static java.lang.String |
RESULT_COLLECTION_TYPE
Configures the collection class implementation for the queries result. |
Constructor Summary | |
---|---|
QueryHints()
|
Method Summary |
---|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String BIND_PARAMETERS
public static final java.lang.String CACHE_USAGE
public static final java.lang.String QUERY_REDIRECTOR
public static final java.lang.String QUERY_TYPE
public static final java.lang.String PESSIMISTIC_LOCK
public static final java.lang.String REFRESH
public static final java.lang.String BATCH
e.g. e.manager.phoneNumbers
public static final java.lang.String FETCH
e.g. e.manager.phoneNumbers
public static final java.lang.String READ_ONLY
public static final java.lang.String JDBC_TIMEOUT
public static final java.lang.String JDBC_FETCH_SIZE
public static final java.lang.String JDBC_MAX_ROWS
public static final java.lang.String RESULT_COLLECTION_TYPE
e.g. java.util.ArrayList
public static final java.lang.String REFRESH_CASCADE
Constructor Detail |
---|
public QueryHints()
|
EclipseLink1.0 - 20080707 API Reference | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |