Deprecated API
Contents
-
Interfaces Interface Description org.hibernate.BasicQueryContract (since 5.2) useCommonQueryContractinstead.org.hibernate.boot.spi.AdditionalJaxbMappingProducer Intended for Envers integration until we can migrate Envers away from XML generation for building its model.org.hibernate.bytecode.enhance.spi.LazyPropertyInitializer.InterceptorImplementor Prefer the form of these methods defined onBytecodeLazyAttributeInterceptorinsteadorg.hibernate.cache.RegionFactory Moved, but still need this definition for ehcacheorg.hibernate.cache.spi.QueryCache UseQueryResultsCacheinstead -CacheImplementor.getQueryResultsCache(java.lang.String)rather thanCacheImplementor.getQueryCache()org.hibernate.cache.spi.UpdateTimestampsCache UseTimestampsCacheinsteadorg.hibernate.cfg.NamingStrategy Aorg.hibernate.cfg.naming.NamingStrategyDelegatorshould be used instead.org.hibernate.ejb.AvailableSettings use org.hibernate.jpa.AvailableSettingsorg.hibernate.ejb.HibernateEntityManager UseHibernateEntityManagerinsteadorg.hibernate.ejb.HibernateEntityManagerFactory UseHibernateEntityManagerFactoryinsteadorg.hibernate.ejb.HibernateQuery UseHibernateQueryinsteadorg.hibernate.engine.spi.CacheImplementor Moved toCacheImplementororg.hibernate.engine.spi.SessionOwner (since 5.2) since consolidating hibernate-entitymanager into hibernate-core I believe this is no longer needed.org.hibernate.integrator.spi.ServiceContributingIntegrator A separateServiceContributorshould be used instead.org.hibernate.jmx.spi.JmxService Scheduled for removal in 6.0; see https://hibernate.atlassian.net/browse/HHH-14847 and https://hibernate.atlassian.net/browse/HHH-14846org.hibernate.jpa.event.spi.jpa.ExtendedBeanManager UseExtendedBeanManagerinsteadorg.hibernate.jpa.event.spi.jpa.ExtendedBeanManager.LifecycleListener UseExtendedBeanManager.LifecycleListenerinsteadorg.hibernate.jpa.HibernateEntityManager (snce 5.2) Use Session (or SessionImplementor), as it now extends EntityManager directlyorg.hibernate.jpa.HibernateEntityManagerFactory (since 5.2) Use SessionFactory (or SessionFactoryImplementor) as it now extends EntityManagerFactory directlyorg.hibernate.jpa.spi.HibernateEntityManagerFactoryAware (since 5.2) Why do we need an over-arching access to HibernateEntityManagerFactory across multiple contract hierarchies?org.hibernate.jpa.spi.HibernateEntityManagerImplementor (since 5.2) move these methods to SessionImplementororg.hibernate.mapping.RelationalModel (since 5.2) not needed anymore.org.hibernate.Query (since 5.2) useQueryinsteadorg.hibernate.secure.spi.JaccService Support for JACC will be removed in 6.0org.hibernate.secure.spi.PermissionCheckEntityInformation Support for JACC will be removed in 6.0org.hibernate.service.spi.Manageable Scheduled for removal in 6.0; see https://hibernate.atlassian.net/browse/HHH-14847 and https://hibernate.atlassian.net/browse/HHH-14846org.hibernate.SQLQuery (since 5.2) useNativeQueryinstead.org.hibernate.stat.NaturalIdCacheStatistics (since 5.3) UseNaturalIdStatistics- unfortunately the old statistics contracts exposed these by region name, rather than the name of the entity defining the natural-idorg.hibernate.stat.SecondLevelCacheStatistics UseCacheRegionStatisticsinsteadorg.hibernate.tool.hbm2ddl.ConnectionHelper Everything in this package has been replaced withSchemaManagementTooland friends.org.hibernate.tuple.Property Use the directAttributehierarchyorg.hibernate.type.descriptor.WrapperOptionsContext (since 5.2) Just directly implement WrapperOptionsorg.hibernate.type.TypeFactory.TypeScope UseTypeConfiguration/TypeConfiguration.Scopeinstead
-
Classes Class Description org.hibernate.cfg.AttributeConverterDefinition (since 5.3) forces the converter instance to be built too early, which precludes the ability to resolve them from CDI, etc. SeeConverterDescriptorinsteadorg.hibernate.cfg.Settings UseSessionFactoryOptionsinstead.org.hibernate.criterion.Expression UseRestrictionsinsteadorg.hibernate.criterion.IlikeExpression PreferLikeExpressionwhich now has case-insensitivity capability.org.hibernate.dialect.DerbyDialect HHH-6073org.hibernate.dialect.MySQL57InnoDBDialect Use "hibernate.dialect.storage_engine=innodb" environment variable or JVM system property instead.org.hibernate.dialect.MySQL5InnoDBDialect Use "hibernate.dialect.storage_engine=innodb" environment variable or JVM system property instead.org.hibernate.dialect.MySQLInnoDBDialect Use "hibernate.dialect.storage_engine=innodb" environment variable or JVM system property instead.org.hibernate.dialect.MySQLMyISAMDialect Use "hibernate.dialect.storage_engine=myisam" environment variable or JVM system property instead.org.hibernate.dialect.Oracle9Dialect Use either Oracle9iDialect or Oracle10gDialect insteadorg.hibernate.dialect.OracleDialect Use Oracle8iDialect instead.org.hibernate.dialect.PostgreSQLDialect usePostgreSQL82Dialectinsteadorg.hibernate.id.MultipleHiLoPerTableGenerator UseTableGeneratorinstead.org.hibernate.id.SequenceGenerator UseSequenceStyleGeneratorinsteadorg.hibernate.id.SequenceHiLoGenerator See deprecation discussion onSequenceGeneratororg.hibernate.id.SequenceIdentityGenerator See deprecation discussion onSequenceGeneratororg.hibernate.lob.ReaderInputStream Should not be used anymore.org.hibernate.mapping.PropertyGeneration This is replaced byValueGenerationandGenerationTimingorg.hibernate.property.access.spi.EnhancedGetterMethodImpl No longer used;GetterFieldImplorGetterMethodImplshould be used instead.org.hibernate.secure.spi.GrantedPermission Support for JACC will be removed in 6.0org.hibernate.secure.spi.JaccIntegrator Support for JACC will be removed in 6.0org.hibernate.secure.spi.JaccPermissionDeclarations Support for JACC will be removed in 6.0org.hibernate.tool.hbm2ddl.ColumnMetadata UseColumnInformationorColumnInformationImplinsteadorg.hibernate.tool.hbm2ddl.ForeignKeyMetadata Everything in this package has been replaced withSchemaManagementTooland friends.org.hibernate.tool.hbm2ddl.IndexMetadata Everything in this package has been replaced withSchemaManagementTooland friends.org.hibernate.tool.hbm2ddl.SchemaUpdateCommand Everything in this package has been replaced withSchemaManagementTooland friends.org.hibernate.tool.hbm2ddl.TableMetadata Everything in this package has been replaced withSchemaManagementTooland friends.org.hibernate.tool.instrument.javassist.InstrumentTask This is the legacy Ant-task Hibernate provided historically to perform its old-school bytecode instrumentation. That has been replaced wholesale with a new approach to bytecode manipulation offering 3 build-time variations for Ant, Maven and Gradle.org.hibernate.tuple.StandardProperty Use one of theAttribute-based impls instead.org.hibernate.type.descriptor.java.JavaTypeDescriptorRegistry Use (5.3) UseJavaTypeDescriptorRegistryinsteadorg.hibernate.type.descriptor.sql.SqlTypeDescriptorRegistry (5.3) UseSqlTypeDescriptorRegistryinstead.org.hibernate.type.TypeFactory UseTypeConfigurationinsteadorg.hibernate.type.TypeHelper with no real replacement. this was always intended as an internal classorg.hibernate.type.TypeResolver (since 5.3) No replacement, access to and handling of Types will be much different in 6.0
-
Enums Enum Description org.hibernate.annotations.SortType SinceSortis deprecated.org.hibernate.secure.spi.PermissibleAction Support for JACC will be removed in 6.0
-
Exceptions Exceptions Description org.hibernate.cfg.RecoverableException Was only ever referenced in a single place, in an extremely dubious way.org.hibernate.MappingNotFoundException UseMappingNotFoundExceptioninstead.org.hibernate.OptimisticLockException UseOptimisticEntityLockExceptioninsteadorg.hibernate.tool.hbm2ddl.ImportScriptException Everything in this package has been replaced withSchemaManagementTooland friends.
-
Annotation Types Annotation Type Description org.hibernate.annotations.AccessType UseAttributeAccessorinstead; renamed to avoid confusion with the JPAAccessTypeenum.org.hibernate.annotations.Entity See individual attributes for intended replacements. To be removed in 4.1org.hibernate.annotations.ForeignKey Prefer the JPA 2.1 introducedForeignKeyinstead.org.hibernate.annotations.Index UsingIndexinstead.org.hibernate.annotations.IndexColumn Prefer the standard JPAOrderColumnannotation and the Hibernate specificListIndexBase(for replacingIndexColumn.base()).org.hibernate.annotations.Sort UseSortComparatororSortNaturalinstead depending on need.
-
Enum Constants Enum Constant Description org.hibernate.annotations.CascadeType.DELETE_ORPHAN use @OneToOne(orphanRemoval=true) or @OneToMany(orphanRemoval=true)org.hibernate.annotations.CascadeType.EVICT org.hibernate.annotations.FlushModeType.NEVER use MANUAL, will be removed in a subsequent releaseorg.hibernate.LockMode.FORCE instead use PESSIMISTIC_FORCE_INCREMENTorg.hibernate.LockMode.UPGRADE instead use PESSIMISTIC_WRITE
-
Annotation Type Elements Annotation Type Element Description org.hibernate.annotations.Entity.dynamicInsert() useDynamicInsertinsteadorg.hibernate.annotations.Entity.dynamicUpdate() UseDynamicUpdateinsteadorg.hibernate.annotations.Entity.mutable() useImmutableorg.hibernate.annotations.Entity.optimisticLock() useOptimisticLockinginstead.org.hibernate.annotations.Entity.persister() usePersisterinsteadorg.hibernate.annotations.Entity.polymorphism() usePolymorphisminsteadorg.hibernate.annotations.Entity.selectBeforeUpdate() UseSelectBeforeUpdateinsteadorg.hibernate.annotations.Tuplizer.entityMode() should use #entityModeType instead