Top Description Inners Fields Constructors Methods
org.eclipse.persistence.internal.jpa

public Class QueryHintsHandler

extends Object
Class Inheritance
Imports
java.security.AccessController, .PrivilegedActionException, java.sql.Time, java.util.Calendar, .HashMap, .Iterator, .Locale, .Map, .Set, .StringTokenizer, java.util.concurrent.TimeUnit, jakarta.persistence.CacheRetrieveMode, .CacheStoreMode, org.eclipse.persistence.exceptions.ConversionException, .DescriptorException, .QueryException, org.eclipse.persistence.queries.DatabaseQuery, .ObjectLevelReadQuery, .ReadAllQuery, .AttributeGroup, .CursorPolicy, .CursoredStreamPolicy, .DataModifyQuery, .DataReadQuery, .DeleteAllQuery, .DirectReadQuery, .FetchGroup, .InMemoryQueryIndirectionPolicy, .LoadGroup, .ModifyAllQuery, .ModifyQuery, .ObjectBuildingQuery, .QueryRedirector, .ReadObjectQuery, .ReadQuery, .ReportQuery, .ResultSetMappingQuery, .ScrollableCursorPolicy, .UpdateAllQuery, .ValueReadQuery, org.eclipse.persistence.expressions.Expression, org.eclipse.persistence.annotations.BatchFetchType, .CacheType, org.eclipse.persistence.config.*, org.eclipse.persistence.descriptors.ClassDescriptor, org.eclipse.persistence.descriptors.invalidation.DailyCacheInvalidationPolicy, .TimeToLiveCacheInvalidationPolicy, org.eclipse.persistence.descriptors.partitioning.PartitioningPolicy, org.eclipse.persistence.history.AsOfClause, .AsOfSCNClause, org.eclipse.persistence.internal.helper.ClassConstants, .Helper, org.eclipse.persistence.internal.localization.ExceptionLocalization, org.eclipse.persistence.internal.queries.ContainerPolicy, org.eclipse.persistence.internal.security.PrivilegedAccessHelper, .PrivilegedClassForName, .PrivilegedNewInstanceFromClass, org.eclipse.persistence.internal.sessions.AbstractSession, org.eclipse.persistence.logging.SessionLog, org.eclipse.persistence.mappings.ForeignReferenceMapping, .DatabaseMapping

The class processes query hints. EclipseLink query hints and their values defined in org.eclipse.persistence.config package. To add a new query hint: Define a new hint in QueryHints; Add a class containing hint's values if required to config package (like CacheUsage); Alternatively values defined in HintValues may be used - Refresh and BindParameters hints do that. Add an inner class to this class extending Hint corresponding to the new hint (like CacheUsageHint); The first constructor parameter is hint name; the second is default value; In constructor provide 2-dimensional value array in case the values should be translated (currently all Hint classes do that); in case translation is not required provide a single-dimension array (no such examples yet). In inner class Hint static initializer addHint an instance of the new hint class (like addHint(new CacheUsageHint())).
See Also
QueryHints, HintValues, CacheUsage, PessimisticLock

Nested and Inner Type Summary

Modifier and TypeClass and Description
protected static class
protected static class
protected static class
protected static class
protected static class
protected static class
protected static class
QueryHintsHandler.BatchWriteHint

Configure the cache usage of the query.

protected static class
protected static class
protected static class
protected static class
protected static class
protected static class
protected static class
QueryHintsHandler.CacheUsageHint

Configure the cache usage of the query.

protected static class
protected static class
protected static class
protected static class
protected static class
protected static class
protected static class
protected static class
protected static class
protected static class
protected static class
protected static class
protected static class
protected static class
protected static class
protected abstract static class
QueryHintsHandler.Hint

Define a generic Hint.

protected static class
protected static class
protected static class
protected static class
protected static class
protected static class
protected static class
protected static class
protected static class
protected static class
protected static class
protected static class
protected static class
protected static class
QueryHintsHandler.ParameterDelimiterHint

INTERNAL: 325167: Make reserved # bind parameter char generic to enable native SQL pass through

protected static class
protected static class
protected static class
protected static class
protected static class
protected static class
protected static class
protected static class
QueryHintsHandler.QueryCacheExpiryHint

Define the query cache expiry hint.

protected static class
QueryHintsHandler.QueryCacheExpiryTimeOfDayHint

Define the query cache expiry time of day hint.

protected static class
QueryHintsHandler.QueryCacheHint

Define the query cache hint.

protected static class
QueryHintsHandler.QueryCacheIgnoreNullHint

Define the query cache ignore null hint.

protected static class
QueryHintsHandler.QueryCacheInvalidateOnChangeHint

Define the query cache ignore null hint.

protected static class
QueryHintsHandler.QueryCacheRandomizedExpiryHint

Define the query cache randomized expiry hint.

protected static class
QueryHintsHandler.QueryCacheSizeHint

Define the query cache size hint.

protected static class
QueryHintsHandler.QueryCacheTypeHint

Define the query cache type hint.

protected static class
protected static class
protected static class
protected static class
QueryHintsHandler.QueryTypeHint

Configure the type of the query.

protected static class
protected static class
protected static class
protected static class
protected static class
protected static class
protected static class
protected static class
protected static class
QueryHintsHandler.ReturnNameValuePairsHint

This hint can be used to indicate whether or not a ResultSetMapping query should return populated DatabaseRecords vs. raw data.

protected static class
protected static class

Field Summary

Modifier and TypeField and Description
public static final String

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public static DatabaseQuery
apply(Map<String, Object> hints, DatabaseQuery query, ClassLoader loader, AbstractSession activeSession)

Applies the hints to the query.

public static DatabaseQuery
apply(String hintName, Object hintValue, DatabaseQuery query, ClassLoader loader, AbstractSession activeSession)

Applies the hint to the query.

public static Set<String>
public static boolean
parseBooleanHint(Object hint)

Common hint value processing into an boolean value.

public static int
parseIntegerHint(Object hint, String hintName)

Common hint value processing into an integer value.

protected static boolean
shouldUseDefault(Object hintValue)

Empty String hintValue indicates that the default hint value should be used.

public static void
verify(Map<K, V> hints, String queryName, AbstractSession session)

Verifies the hints.

public static void
verify(String hintName, Object hintValue, String queryName, AbstractSession session)

Verifies the hint.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait