/*
 * Hibernate, Relational Persistence for Idiomatic Java
 *
 * License: GNU Lesser General Public License (LGPL), version 2.1 or later.
 * See the lgpl.txt file in the root directory or <http://www.gnu.org/licenses/lgpl-2.1.html>.
 */
package org.hibernate.jpa;

Defines the available HEM settings, both JPA-defined as well as Hibernate-specific

NOTE : Does *not* include Environment values.
Author:Steve Ebersole
/** * Defines the available HEM settings, both JPA-defined as well as Hibernate-specific * <p/> * NOTE : Does *not* include {@link org.hibernate.cfg.Environment} values. * * @author Steve Ebersole */
public interface AvailableSettings { // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // JPA-defined settings - general // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Deprecated:(since 5.2) use AvailableSettings.JPA_PERSISTENCE_PROVIDER instead
/** * @deprecated (since 5.2) use {@link org.hibernate.cfg.AvailableSettings#JPA_PERSISTENCE_PROVIDER} instead */
@Deprecated String PROVIDER = org.hibernate.cfg.AvailableSettings.JPA_PERSISTENCE_PROVIDER;
Deprecated:(since 5.2) use AvailableSettings.JPA_TRANSACTION_TYPE instead
/** * @deprecated (since 5.2) use {@link org.hibernate.cfg.AvailableSettings#JPA_TRANSACTION_TYPE} instead */
@Deprecated String TRANSACTION_TYPE = org.hibernate.cfg.AvailableSettings.JPA_TRANSACTION_TYPE;
Deprecated:(since 5.2) use AvailableSettings.JPA_JTA_DATASOURCE instead
/** * @deprecated (since 5.2) use {@link org.hibernate.cfg.AvailableSettings#JPA_JTA_DATASOURCE} instead */
@Deprecated String JTA_DATASOURCE = org.hibernate.cfg.AvailableSettings.JPA_JTA_DATASOURCE;
Deprecated:(since 5.2) use AvailableSettings.JPA_NON_JTA_DATASOURCE instead
/** * @deprecated (since 5.2) use {@link org.hibernate.cfg.AvailableSettings#JPA_NON_JTA_DATASOURCE} instead */
@Deprecated String NON_JTA_DATASOURCE = org.hibernate.cfg.AvailableSettings.JPA_NON_JTA_DATASOURCE;
Deprecated:(since 5.2) use AvailableSettings.JPA_JDBC_DRIVER instead
/** * @deprecated (since 5.2) use {@link org.hibernate.cfg.AvailableSettings#JPA_JDBC_DRIVER} instead */
@Deprecated String JDBC_DRIVER = org.hibernate.cfg.AvailableSettings.JPA_JDBC_DRIVER;
Deprecated:(since 5.2) use AvailableSettings.JPA_JDBC_URL instead
/** * @deprecated (since 5.2) use {@link org.hibernate.cfg.AvailableSettings#JPA_JDBC_URL} instead */
@Deprecated String JDBC_URL = org.hibernate.cfg.AvailableSettings.JPA_JDBC_URL;
Deprecated:(since 5.2) use AvailableSettings.JPA_JDBC_USER instead
/** * @deprecated (since 5.2) use {@link org.hibernate.cfg.AvailableSettings#JPA_JDBC_USER} instead */
@Deprecated String JDBC_USER = org.hibernate.cfg.AvailableSettings.JPA_JDBC_USER;
Deprecated:(since 5.2) use AvailableSettings.JPA_JDBC_PASSWORD instead
/** * @deprecated (since 5.2) use {@link org.hibernate.cfg.AvailableSettings#JPA_JDBC_PASSWORD} instead */
@Deprecated String JDBC_PASSWORD = org.hibernate.cfg.AvailableSettings.JPA_JDBC_PASSWORD;
Deprecated:(since 5.2) use AvailableSettings.JPA_SHARED_CACHE_MODE instead
/** * @deprecated (since 5.2) use {@link org.hibernate.cfg.AvailableSettings#JPA_SHARED_CACHE_MODE} instead */
@Deprecated String SHARED_CACHE_MODE = org.hibernate.cfg.AvailableSettings.JPA_SHARED_CACHE_MODE;
Deprecated:(since 5.2) use AvailableSettings.JPA_SHARED_CACHE_RETRIEVE_MODE instead
/** * @deprecated (since 5.2) use {@link org.hibernate.cfg.AvailableSettings#JPA_SHARED_CACHE_RETRIEVE_MODE} instead */
@Deprecated String SHARED_CACHE_RETRIEVE_MODE = org.hibernate.cfg.AvailableSettings.JPA_SHARED_CACHE_RETRIEVE_MODE;
Deprecated:(since 5.2) use AvailableSettings.JPA_SHARED_CACHE_STORE_MODE instead
/** * @deprecated (since 5.2) use {@link org.hibernate.cfg.AvailableSettings#JPA_SHARED_CACHE_STORE_MODE} instead */
@Deprecated String SHARED_CACHE_STORE_MODE = org.hibernate.cfg.AvailableSettings.JPA_SHARED_CACHE_STORE_MODE;
Deprecated:(since 5.2) use AvailableSettings.JPA_VALIDATION_MODE instead
/** * @deprecated (since 5.2) use {@link org.hibernate.cfg.AvailableSettings#JPA_VALIDATION_MODE} instead */
@Deprecated String VALIDATION_MODE = org.hibernate.cfg.AvailableSettings.JPA_VALIDATION_MODE;
Deprecated:(since 5.2) use AvailableSettings.JPA_VALIDATION_FACTORY instead
/** * @deprecated (since 5.2) use {@link org.hibernate.cfg.AvailableSettings#JPA_VALIDATION_FACTORY} instead */
@Deprecated String VALIDATION_FACTORY = org.hibernate.cfg.AvailableSettings.JPA_VALIDATION_FACTORY;
Deprecated:(since 5.2) use AvailableSettings.JPA_PERSIST_VALIDATION_GROUP instead
/** * @deprecated (since 5.2) use {@link org.hibernate.cfg.AvailableSettings#JPA_PERSIST_VALIDATION_GROUP} instead */
@Deprecated String PERSIST_VALIDATION_GROUP = org.hibernate.cfg.AvailableSettings.JPA_PERSIST_VALIDATION_GROUP;
Deprecated:(since 5.2) use AvailableSettings.JPA_UPDATE_VALIDATION_GROUP instead
/** * @deprecated (since 5.2) use {@link org.hibernate.cfg.AvailableSettings#JPA_UPDATE_VALIDATION_GROUP} instead */
@Deprecated String UPDATE_VALIDATION_GROUP = org.hibernate.cfg.AvailableSettings.JPA_UPDATE_VALIDATION_GROUP;
Deprecated:(since 5.2) use AvailableSettings.JPA_REMOVE_VALIDATION_GROUP instead
/** * @deprecated (since 5.2) use {@link org.hibernate.cfg.AvailableSettings#JPA_REMOVE_VALIDATION_GROUP} instead */
@Deprecated String REMOVE_VALIDATION_GROUP = org.hibernate.cfg.AvailableSettings.JPA_REMOVE_VALIDATION_GROUP;
Deprecated:(since 5.2) use AvailableSettings.JPA_LOCK_SCOPE instead
/** * @deprecated (since 5.2) use {@link org.hibernate.cfg.AvailableSettings#JPA_LOCK_SCOPE} instead */
@Deprecated String LOCK_SCOPE = org.hibernate.cfg.AvailableSettings.JPA_LOCK_SCOPE;
Deprecated:(since 5.2) use AvailableSettings.JPA_LOCK_TIMEOUT instead
/** * @deprecated (since 5.2) use {@link org.hibernate.cfg.AvailableSettings#JPA_LOCK_TIMEOUT} instead */
@Deprecated String LOCK_TIMEOUT = org.hibernate.cfg.AvailableSettings.JPA_LOCK_TIMEOUT;
Deprecated:(since 5.2) use AvailableSettings.CDI_BEAN_MANAGER instead
/** * @deprecated (since 5.2) use {@link org.hibernate.cfg.AvailableSettings#CDI_BEAN_MANAGER} instead */
@Deprecated String CDI_BEAN_MANAGER = org.hibernate.cfg.AvailableSettings.CDI_BEAN_MANAGER; // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // JPA-defined settings - schema export // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Deprecated:(since 5.2) use AvailableSettings.HBM2DDL_CREATE_SOURCE instead
/** * @deprecated (since 5.2) use {@link org.hibernate.cfg.AvailableSettings#HBM2DDL_CREATE_SOURCE} instead */
@Deprecated String SCHEMA_GEN_CREATE_SOURCE = org.hibernate.cfg.AvailableSettings.HBM2DDL_CREATE_SOURCE;
Deprecated:(since 5.2) use AvailableSettings.HBM2DDL_DROP_SOURCE instead
/** * @deprecated (since 5.2) use {@link org.hibernate.cfg.AvailableSettings#HBM2DDL_DROP_SOURCE} instead */
@Deprecated String SCHEMA_GEN_DROP_SOURCE = org.hibernate.cfg.AvailableSettings.HBM2DDL_DROP_SOURCE;
Deprecated:(since 5.2) use AvailableSettings.HBM2DDL_CREATE_SCRIPT_SOURCE instead
/** * @deprecated (since 5.2) use {@link org.hibernate.cfg.AvailableSettings#HBM2DDL_CREATE_SCRIPT_SOURCE} instead */
@Deprecated String SCHEMA_GEN_CREATE_SCRIPT_SOURCE = org.hibernate.cfg.AvailableSettings.HBM2DDL_CREATE_SCRIPT_SOURCE;
Deprecated:(since 5.2) use AvailableSettings.HBM2DDL_DROP_SCRIPT_SOURCE instead
/** * @deprecated (since 5.2) use {@link org.hibernate.cfg.AvailableSettings#HBM2DDL_DROP_SCRIPT_SOURCE} instead */
@Deprecated String SCHEMA_GEN_DROP_SCRIPT_SOURCE = org.hibernate.cfg.AvailableSettings.HBM2DDL_DROP_SCRIPT_SOURCE;
Deprecated:(since 5.2) use AvailableSettings.HBM2DDL_DATABASE_ACTION instead
/** * @deprecated (since 5.2) use {@link org.hibernate.cfg.AvailableSettings#HBM2DDL_DATABASE_ACTION} instead */
@Deprecated String SCHEMA_GEN_DATABASE_ACTION = org.hibernate.cfg.AvailableSettings.HBM2DDL_DATABASE_ACTION;
Deprecated:(since 5.2) use AvailableSettings.HBM2DDL_SCRIPTS_ACTION instead
/** * @deprecated (since 5.2) use {@link org.hibernate.cfg.AvailableSettings#HBM2DDL_SCRIPTS_ACTION} instead */
@Deprecated String SCHEMA_GEN_SCRIPTS_ACTION = org.hibernate.cfg.AvailableSettings.HBM2DDL_SCRIPTS_ACTION;
Deprecated:(since 5.2) use AvailableSettings.HBM2DDL_SCRIPTS_CREATE_TARGET instead
/** * @deprecated (since 5.2) use {@link org.hibernate.cfg.AvailableSettings#HBM2DDL_SCRIPTS_CREATE_TARGET} instead */
@Deprecated String SCHEMA_GEN_SCRIPTS_CREATE_TARGET = org.hibernate.cfg.AvailableSettings.HBM2DDL_SCRIPTS_CREATE_TARGET;
Deprecated:(since 5.2) use AvailableSettings.HBM2DDL_SCRIPTS_DROP_TARGET instead
/** * @deprecated (since 5.2) use {@link org.hibernate.cfg.AvailableSettings#HBM2DDL_SCRIPTS_DROP_TARGET} instead */
@Deprecated String SCHEMA_GEN_SCRIPTS_DROP_TARGET = org.hibernate.cfg.AvailableSettings.HBM2DDL_SCRIPTS_DROP_TARGET;
Deprecated:(since 5.2) use AvailableSettings.HBM2DLL_CREATE_NAMESPACES or AvailableSettings.HBM2DLL_CREATE_SCHEMAS instead
/** * @deprecated (since 5.2) use {@link org.hibernate.cfg.AvailableSettings#HBM2DLL_CREATE_NAMESPACES} * or {@link org.hibernate.cfg.AvailableSettings#HBM2DLL_CREATE_SCHEMAS} instead */
@Deprecated String SCHEMA_GEN_CREATE_SCHEMAS = org.hibernate.cfg.AvailableSettings.HBM2DLL_CREATE_NAMESPACES;
Deprecated:(since 5.2) use AvailableSettings.HBM2DDL_CONNECTION instead
/** * @deprecated (since 5.2) use {@link org.hibernate.cfg.AvailableSettings#HBM2DDL_CONNECTION} instead */
@Deprecated String SCHEMA_GEN_CONNECTION = org.hibernate.cfg.AvailableSettings.HBM2DDL_CONNECTION;
Deprecated:(since 5.2) use AvailableSettings.HBM2DDL_DB_NAME instead
/** * @deprecated (since 5.2) use {@link org.hibernate.cfg.AvailableSettings#HBM2DDL_DB_NAME} instead */
@Deprecated String SCHEMA_GEN_DB_NAME = org.hibernate.cfg.AvailableSettings.HBM2DDL_DB_NAME;
Deprecated:(since 5.2) use AvailableSettings.HBM2DDL_DB_MAJOR_VERSION instead
/** * @deprecated (since 5.2) use {@link org.hibernate.cfg.AvailableSettings#HBM2DDL_DB_MAJOR_VERSION} instead */
@Deprecated String SCHEMA_GEN_DB_MAJOR_VERSION = org.hibernate.cfg.AvailableSettings.HBM2DDL_DB_MAJOR_VERSION;
Deprecated:(since 5.2) use AvailableSettings.HBM2DDL_DB_MINOR_VERSION instead
/** * @deprecated (since 5.2) use {@link org.hibernate.cfg.AvailableSettings#HBM2DDL_DB_MINOR_VERSION} instead */
@Deprecated String SCHEMA_GEN_DB_MINOR_VERSION = org.hibernate.cfg.AvailableSettings.HBM2DDL_DB_MINOR_VERSION;
Deprecated:(since 5.2) use AvailableSettings.HBM2DDL_LOAD_SCRIPT_SOURCE instead
/** * @deprecated (since 5.2) use {@link org.hibernate.cfg.AvailableSettings#HBM2DDL_LOAD_SCRIPT_SOURCE} instead */
@Deprecated String SCHEMA_GEN_LOAD_SCRIPT_SOURCE = org.hibernate.cfg.AvailableSettings.HBM2DDL_LOAD_SCRIPT_SOURCE; // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // Hibernate specific settings // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Setting that indicates whether to build the JPA types. Accepts 3 values:
  • enabled - Do the build
  • disabled - Do not so the build
  • ignoreUnsupported - Do the build, but ignore any non-JPA features that would otherwise result in a failure.
Deprecated:use AvailableSettings.STATIC_METAMODEL_POPULATION instead
/** * Setting that indicates whether to build the JPA types. Accepts * 3 values:<ul> * <li> * <b>enabled</b> - Do the build * </li> * <li> * <b>disabled</b> - Do not so the build * </li> * <li> * <b>ignoreUnsupported</b> - Do the build, but ignore any non-JPA features that would otherwise * result in a failure. * </li> * </ul> * * @deprecated use {@link org.hibernate.cfg.AvailableSettings#STATIC_METAMODEL_POPULATION} instead */
@Deprecated String JPA_METAMODEL_POPULATION = "hibernate.ejb.metamodel.population";
Deprecated:(since 5.2) use AvailableSettings.INTERCEPTOR instead
/** * @deprecated (since 5.2) use {@link org.hibernate.cfg.AvailableSettings#INTERCEPTOR} instead */
@Deprecated String INTERCEPTOR = "hibernate.ejb.interceptor";
Deprecated:(since 5.2) use AvailableSettings.SESSION_SCOPED_INTERCEPTOR instead
/** * @deprecated (since 5.2) use {@link org.hibernate.cfg.AvailableSettings#SESSION_SCOPED_INTERCEPTOR} instead */
@Deprecated String SESSION_INTERCEPTOR = "hibernate.ejb.interceptor.session_scoped";
Query hint (aka Query.setHint) for applying an alias specific lock mode (aka Query.setLockMode).

Either LockMode or LockModeType are accepted. Also the String names of either are accepted as well. null is additionally accepted as meaning LockMode.NONE.

Usage is to concatenate this setting name and the alias name together, separated by a dot. For exampleQuery.setHint( "org.hibernate.lockMode.a", someLockMode ) would apply someLockMode to the alias "a".
/** * Query hint (aka {@link javax.persistence.Query#setHint}) for applying * an alias specific lock mode (aka {@link org.hibernate.Query#setLockMode}). * <p/> * Either {@link org.hibernate.LockMode} or {@link javax.persistence.LockModeType} * are accepted. Also the String names of either are accepted as well. <tt>null</tt> * is additionally accepted as meaning {@link org.hibernate.LockMode#NONE}. * <p/> * Usage is to concatenate this setting name and the alias name together, separated * by a dot. For example<code>Query.setHint( "org.hibernate.lockMode.a", someLockMode )</code> * would apply <code>someLockMode</code> to the alias <code>"a"</code>. */
//Use the org.hibernate prefix. instead of hibernate. as it is a query hint se QueryHints String ALIAS_SPECIFIC_LOCK_MODE = "org.hibernate.lockMode";
cfg.xml configuration file used
/** * cfg.xml configuration file used */
String CFG_FILE = "hibernate.ejb.cfgfile";
Caching configuration should follow the following pattern hibernate.ejb.classcache. usage[, region] where usage is the cache strategy used and region the cache region name
/** * Caching configuration should follow the following pattern * hibernate.ejb.classcache.<fully.qualified.Classname> usage[, region] * where usage is the cache strategy used and region the cache region name */
String CLASS_CACHE_PREFIX = "hibernate.ejb.classcache";
Caching configuration should follow the following pattern hibernate.ejb.collectioncache.. usage[, region] where usage is the cache strategy used and region the cache region name
/** * Caching configuration should follow the following pattern * hibernate.ejb.collectioncache.<fully.qualified.Classname>.<role> usage[, region] * where usage is the cache strategy used and region the cache region name */
String COLLECTION_CACHE_PREFIX = "hibernate.ejb.collectioncache";
SessionFactoryObserver class name, the class must have a no-arg constructor
/** * SessionFactoryObserver class name, the class must have a no-arg constructor */
String SESSION_FACTORY_OBSERVER = "hibernate.ejb.session_factory_observer";
IdentifierGeneratorStrategyProvider class name, the class must have a no-arg constructor
/** * IdentifierGeneratorStrategyProvider class name, the class must have a no-arg constructor */
String IDENTIFIER_GENERATOR_STRATEGY_PROVIDER = "hibernate.ejb.identifier_generator_strategy_provider";
Event configuration should follow the following pattern hibernate.ejb.event.[eventType] f.q.c.n.EventListener1, f.q.c.n.EventListener12 ...
/** * Event configuration should follow the following pattern * hibernate.ejb.event.[eventType] f.q.c.n.EventListener1, f.q.c.n.EventListener12 ... */
String EVENT_LISTENER_PREFIX = "hibernate.ejb.event";
Enable dirty tracking feature in runtime bytecode enhancement
/** * Enable dirty tracking feature in runtime bytecode enhancement */
String ENHANCER_ENABLE_DIRTY_TRACKING = "hibernate.enhancer.enableDirtyTracking";
Enable lazy loading feature in runtime bytecode enhancement
/** * Enable lazy loading feature in runtime bytecode enhancement */
String ENHANCER_ENABLE_LAZY_INITIALIZATION = "hibernate.enhancer.enableLazyInitialization";
Enable association management feature in runtime bytecode enhancement
/** * Enable association management feature in runtime bytecode enhancement */
String ENHANCER_ENABLE_ASSOCIATION_MANAGEMENT = "hibernate.enhancer.enableAssociationManagement";
Whether or not discard persistent context on entityManager.close() The EJB3 compliant and default choice is false
/** * Whether or not discard persistent context on entityManager.close() * The EJB3 compliant and default choice is false */
String DISCARD_PC_ON_CLOSE = "hibernate.ejb.discard_pc_on_close";
Used to determine flush mode.
/** * Used to determine flush mode. */
//Use the org.hibernate prefix. instead of hibernate. as it is a query hint se QueryHints String FLUSH_MODE = "org.hibernate.flushMode";
EntityManagerFactory name
/** * EntityManagerFactory name */
String ENTITY_MANAGER_FACTORY_NAME = "hibernate.ejb.entitymanager_factory_name";
List of classes names Internal use only
/** * List of classes names * Internal use only */
String XML_FILE_NAMES = "hibernate.ejb.xml_files"; String HBXML_FILES = "hibernate.hbmxml.files"; String LOADED_CLASSES = "hibernate.ejb.loaded.classes";
Used to pass along the name of the persistence unit.
/** * Used to pass along the name of the persistence unit. */
String PERSISTENCE_UNIT_NAME = "hibernate.ejb.persistenceUnitName";
Defines delayed access to CDI BeanManager. Starting in 5.1 the preferred means for CDI bootstrapping is through org.hibernate.jpa.event.spi.jpa.ExtendedBeanManager
Since:5.0.8
/** * Defines delayed access to CDI BeanManager. Starting in 5.1 the preferred means for CDI * bootstrapping is through org.hibernate.jpa.event.spi.jpa.ExtendedBeanManager * * @since 5.0.8 */
String DELAY_CDI_ACCESS = "hibernate.delay_cdi_access";
Setting that allows access to the underlying Transaction, even when using a JTA since normal JPA operations prohibit this behavior.

Values are true grants access, false does not.

The default behavior is to allow access unless the session is bootstrapped via JPA.
/** * Setting that allows access to the underlying {@link org.hibernate.Transaction}, even * when using a JTA since normal JPA operations prohibit this behavior. * <p/> * Values are {@code true} grants access, {@code false} does not. * <p/> * The default behavior is to allow access unless the session is bootstrapped via JPA. */
String ALLOW_JTA_TRANSACTION_ACCESS = "hibernate.jta.allowTransactionAccess"; }