Deprecated API


Contents
Deprecated Interfaces
org.hibernate.type.AbstractComponentType
          in favor of CompositeType 
org.hibernate.cfg.ExtendedMappings
          All functionality has been moved up to Mappings 
org.hibernate.jmx.HibernateServiceMBean
          See HHH-6190 for details 
org.hibernate.hql.internal.ast.tree.ParameterContainer
            
org.hibernate.cache.RegionFactory
          Moved, but still need this definition for ehcache 
org.hibernate.jmx.StatisticsServiceMBean
          See HHH-6190 for details 
 

Deprecated Classes
org.hibernate.type.AbstractBynaryType
          Use the AbstractStandardBasicType approach instead 
org.hibernate.type.AbstractCharArrayType
          Use the AbstractStandardBasicType approach instead 
org.hibernate.type.AbstractLobType
            
org.hibernate.type.AbstractLongBinaryType
          Use the AbstractStandardBasicType approach instead 
org.hibernate.type.AbstractLongStringType
          Use the AbstractStandardBasicType approach instead 
org.hibernate.cfg.AnnotationConfiguration
          All functionality has been moved to Configuration 
org.hibernate.cfg.AnnotationConfiguration.ExtendedMappingsImpl
           
org.hibernate.type.ByteArrayBlobType
          replaced by WrappedMaterializedBlobType 
org.hibernate.type.CharBooleanType
          Use the AbstractStandardBasicType approach instead 
org.hibernate.dialect.DerbyDialect
          HHH-6073 
org.hibernate.ejb.Ejb3Configuration
          Direct usage of this class has never been supported. Instead, the application should obtain reference to the EntityManagerFactory as outlined in the JPA specification, section 7.3 Obtaining an Entity Manager Factory based on runtime environment. Additionally this class will be removed in Hibernate release 5.0 for the same reasoning outlined on Configuration due to move towards new SessionFactory building methodology. See HHH-6181 and HHH-6159 for details 
org.hibernate.criterion.Expression
          Use Restrictions. 
org.hibernate.jmx.HibernateService
          See HHH-6190 for details 
org.hibernate.criterion.IlikeExpression
           
org.hibernate.type.ImmutableType
          Use the AbstractStandardBasicType approach instead 
org.hibernate.internal.util.jndi.JndiHelper
          As JNDI access should get routed through JndiService 
org.hibernate.type.MutableType
          Use the AbstractStandardBasicType approach instead 
org.hibernate.type.NullableType
          Use the AbstractStandardBasicType approach instead 
org.hibernate.dialect.Oracle9Dialect
          Use either Oracle9iDialect or Oracle10gDialect instead 
org.hibernate.dialect.OracleDialect
          Use Oracle8iDialect instead. 
org.hibernate.type.PrimitiveByteArrayBlobType
          replaced by MaterializedBlobType 
org.hibernate.lob.ReaderInputStream
          Should not be used anymore. 
org.hibernate.jmx.SessionFactoryStub
          See HHH-6190 for details 
org.hibernate.exception.internal.SQLStateConverter
          Use StandardSQLExceptionConverter with SQLStateConversionDelegate instead 
org.hibernate.jmx.StatisticsService
          See HHH-6190 for details 
org.hibernate.type.StringClobType
          replaced by MaterializedClobType 
org.hibernate.dialect.SybaseDialect
          use AbstractTransactSQLDialect, SybaseASE15Dialect or SQLServerDialect instead depending on need. 
org.hibernate.envers.strategy.ValidTimeAuditStrategy
          use ValidityAuditStrategy instead. 
 

Deprecated Exceptions
org.hibernate.OptimisticLockException
          Use OptimisticEntityLockException instead 
 

Deprecated Annotation Types
org.hibernate.annotations.Entity
          See individual attributes for intended replacements. To be removed in 4.1 
 

Deprecated Fields
org.hibernate.FetchMode.EAGER
          use FetchMode.JOIN 
org.hibernate.sql.JoinFragment.FULL_JOIN
          use JoinType.FULL_JOIN instead. 
org.hibernate.criterion.CriteriaSpecification.FULL_JOIN
          use JoinType.FULL_JOIN 
org.hibernate.id.enhanced.OptimizerFactory.HILO
          Use OptimizerFactory.StandardOptimizerDescriptor.getExternalName() via OptimizerFactory.StandardOptimizerDescriptor.HILO 
org.hibernate.ejb.QueryHints.HINT_TIMEOUT
          HINT_TIMEOUT (org.hibernate.timeout), instead use SPEC_HINT_TIMEOUT (javax.persistence.query.timeout) 
org.hibernate.ejb.AvailableSettings.IDENTIFIER_GENERATOR_STRATEGY_PROVIDER
          if possible wait of Hibernate 4.1 and theService registry (MutableIdentifierGeneratorStrategy service) 
org.hibernate.sql.JoinFragment.INNER_JOIN
          use JoinType.INNER_JOIN instead. 
org.hibernate.criterion.CriteriaSpecification.INNER_JOIN
          use JoinType.INNER_JOIN 
org.hibernate.FetchMode.LAZY
          use FetchMode.SELECT 
org.hibernate.criterion.CriteriaSpecification.LEFT_JOIN
          use JoinType.LEFT_OUTER_JOIN 
org.hibernate.sql.JoinFragment.LEFT_OUTER_JOIN
          use JoinType.LEFT_OUTER_JOIN instead. 
org.hibernate.id.enhanced.OptimizerFactory.LEGACY_HILO
          Use OptimizerFactory.StandardOptimizerDescriptor.getExternalName() via OptimizerFactory.StandardOptimizerDescriptor.LEGACY_HILO 
org.hibernate.id.enhanced.OptimizerFactory.NONE
          Use OptimizerFactory.StandardOptimizerDescriptor.getExternalName() via OptimizerFactory.StandardOptimizerDescriptor.NONE 
org.hibernate.id.enhanced.OptimizerFactory.POOL
          Use OptimizerFactory.StandardOptimizerDescriptor.getExternalName() via OptimizerFactory.StandardOptimizerDescriptor.POOLED 
org.hibernate.id.enhanced.OptimizerFactory.POOL_LO
          Use OptimizerFactory.StandardOptimizerDescriptor.getExternalName() via OptimizerFactory.StandardOptimizerDescriptor.POOLED_LO 
org.hibernate.cfg.AvailableSettings.PROXOOL_PREFIX
          Use AvailableSettings.PROXOOL_CONFIG_PREFIX instead 
org.hibernate.sql.JoinFragment.RIGHT_OUTER_JOIN
          use JoinType.RIGHT_OUTER_JOIN instead. 
org.hibernate.cfg.AvailableSettings.TRANSACTION_MANAGER_STRATEGY
          See AvailableSettings.JTA_PLATFORM 
org.hibernate.cfg.AvailableSettings.USER_TRANSACTION
          See AvailableSettings.JTA_PLATFORM 
 

Deprecated Methods
org.hibernate.cfg.Mappings.addUniqueConstraints(Table, List)
          Use Mappings.addUniqueConstraintHolders(org.hibernate.mapping.Table, java.util.List) instead 
org.hibernate.id.enhanced.OptimizerFactory.buildOptimizer(String, Class, int)
          Use OptimizerFactory.buildOptimizer(String, Class, int, long) instead 
org.hibernate.cfg.Configuration.buildSessionFactory()
          Use Configuration.buildSessionFactory(ServiceRegistry) instead 
org.hibernate.cfg.annotations.TableBinder.buildUniqueConstraints(UniqueConstraint[])
          Use TableBinder.buildUniqueConstraintHolders(javax.persistence.UniqueConstraint[]) instead 
org.hibernate.StatelessSession.connection()
          just missed when deprecating same method from Session 
org.hibernate.hql.internal.ast.util.ASTUtil.create(ASTFactory, int, String)
          silly 
org.hibernate.Criteria.createAlias(String, String, int)
          use Criteria.createAlias(String, String, org.hibernate.sql.JoinType) 
org.hibernate.criterion.DetachedCriteria.createAlias(String, String, int)
          use DetachedCriteria.createAlias(String, String, JoinType) 
org.hibernate.Criteria.createAlias(String, String, int, Criterion)
          use #createAlias(String, String, JoinType, Criterion 
org.hibernate.criterion.DetachedCriteria.createAlias(String, String, int, Criterion)
          use DetachedCriteria.createAlias(String, String, JoinType, Criterion) 
org.hibernate.Criteria.createCriteria(String, int)
          use Criteria.createAlias(String, String, org.hibernate.sql.JoinType) 
org.hibernate.criterion.DetachedCriteria.createCriteria(String, int)
          use DetachedCriteria.createCriteria(String, JoinType) 
org.hibernate.Criteria.createCriteria(String, String, int)
          use Criteria.createCriteria(String, org.hibernate.sql.JoinType) 
org.hibernate.criterion.DetachedCriteria.createCriteria(String, String, int)
          use DetachedCriteria.createCriteria(String, String, JoinType) 
org.hibernate.Criteria.createCriteria(String, String, int, Criterion)
          use Criteria.createCriteria(String, String, org.hibernate.sql.JoinType, org.hibernate.criterion.Criterion) 
org.hibernate.criterion.DetachedCriteria.createCriteria(String, String, int, Criterion)
          use DetachedCriteria.createCriteria(String, String, JoinType, Criterion) 
org.hibernate.ejb.Ejb3Configuration.createEntityManagerFactory()
            
org.hibernate.ejb.HibernatePersistence.createEntityManagerFactory(Map)
            
org.hibernate.ejb.Ejb3Configuration.createEntityManagerFactory(Map)
          use the Java Persistence API 
org.hibernate.id.IdentifierGeneratorHelper.createNumber(long, Class)
          Use the holders instead. 
org.hibernate.type.TypeFactory.custom(Class, Properties, TypeFactory.TypeScope)
          Only for use temporary use by Hibernate 
org.hibernate.type.TypeFactory.customComponent(Class, Properties, TypeFactory.TypeScope)
          Only for use temporary use by Hibernate 
org.hibernate.SessionFactory.evict(Class)
          Use Cache.evictEntityRegion(Class) accessed through SessionFactory.getCache() instead. 
org.hibernate.SessionFactory.evict(Class, Serializable)
          Use Cache.containsEntity(Class, Serializable) accessed through SessionFactory.getCache() instead. 
org.hibernate.SessionFactory.evictCollection(String)
          Use Cache.evictCollectionRegion(String) accessed through SessionFactory.getCache() instead. 
org.hibernate.SessionFactory.evictCollection(String, Serializable)
          Use Cache.evictCollection(String,Serializable) accessed through SessionFactory.getCache() instead. 
org.hibernate.SessionFactory.evictEntity(String)
          Use Cache.evictEntityRegion(String) accessed through SessionFactory.getCache() instead. 
org.hibernate.SessionFactory.evictEntity(String, Serializable)
          Use Cache.evictEntity(String,Serializable) accessed through SessionFactory.getCache() instead. 
org.hibernate.SessionFactory.evictQueries()
          Use Cache.evictQueryRegions() accessed through SessionFactory.getCache() instead. 
org.hibernate.SessionFactory.evictQueries(String)
          Use Cache.evictQueryRegion(String) accessed through SessionFactory.getCache() instead. 
org.hibernate.cfg.annotations.TableBinder.fillTable(String, String, String, String, boolean, List, String, Table, Mappings)
          Use TableBinder.buildAndFillTable(java.lang.String, java.lang.String, org.hibernate.cfg.ObjectNameSource, org.hibernate.cfg.ObjectNameNormalizer.NamingStrategyHelper, boolean, java.util.List, java.lang.String, org.hibernate.mapping.Table, org.hibernate.cfg.Mappings, java.lang.String) instead. 
org.hibernate.Session.get(Class, Serializable, LockMode)
          LockMode parameter should be replaced with LockOptions 
org.hibernate.Session.get(String, Serializable, LockMode)
          LockMode parameter should be replaced with LockOptions 
org.hibernate.hql.internal.ast.util.ASTUtil.getConstantName(Class, int)
          Use #getTokenTypeName instead 
org.hibernate.dialect.Dialect.getCreateSequenceStrings(String)
          Use Dialect.getCreateSequenceString(String, int, int) instead 
org.hibernate.hql.internal.ast.tree.ConstructorNode.getDataType()
          (tell clover to ignore this method) 
org.hibernate.engine.spi.SessionImplementor.getEnabledFilters()
          use #getLoadQueryInfluencers instead 
org.hibernate.type.CharBooleanType.getFalseString()
          Pass the true/false values into constructor instead. 
org.hibernate.metamodel.binding.AssociationAttributeBinding.getFetchMode()
            
org.hibernate.engine.spi.SessionImplementor.getFetchProfile()
          use #getLoadQueryInfluencers instead 
org.hibernate.engine.spi.SessionImplementor.getFilterParameterType(String)
          use #getLoadQueryInfluencers instead 
org.hibernate.engine.spi.SessionImplementor.getFilterParameterValue(String)
          use #getLoadQueryInfluencers instead 
org.hibernate.tuple.entity.EntityTuplizer.getIdentifier(Object)
          Use EntityTuplizer.getIdentifier(Object,SessionImplementor) instead. 
org.hibernate.metadata.ClassMetadata.getIdentifier(Object)
          Use ClassMetadata.getIdentifier(Object,SessionImplementor) instead 
org.hibernate.persister.entity.EntityPersister.getIdentifier(Object)
          Use EntityPersister.getIdentifier(Object,SessionImplementor) instead 
org.hibernate.engine.spi.Mapping.getIdentifierGeneratorFactory()
          temporary solution 
org.hibernate.sql.Select.getLockMode()
          Instead use getLockOptions 
org.hibernate.test.hql.QueryTranslatorTestCase.getSessionFactoryImplementor()
           
org.hibernate.event.spi.AbstractPreDatabaseOperationEvent.getSource()
          Use AbstractEvent.getSession() instead 
org.hibernate.cfg.Mappings.getTableUniqueConstraints()
          Use Mappings.getUniqueConstraintHoldersByTable() instead 
org.hibernate.type.CharBooleanType.getTrueString()
          Pass the true/false values into constructor instead. 
org.hibernate.tuple.entity.EntityTuplizer.instantiate(Serializable)
          Use EntityTuplizer.instantiate(Serializable, SessionImplementor) instead. 
org.hibernate.cfg.Mappings.iterateAuxliaryDatabaseObjects()
          To fix misspelling; use Mappings.iterateAuxiliaryDatabaseObjects() instead 
org.hibernate.cfg.Mappings.iterateAuxliaryDatabaseObjectsInReverse()
          To fix misspelling; use Mappings.iterateAuxiliaryDatabaseObjectsInReverse() instead 
org.hibernate.Session.load(Class, Serializable, LockMode)
          LockMode parameter should be replaced with LockOptions 
org.hibernate.loader.entity.UniqueEntityLoader.load(Serializable, Object, SessionImplementor)
          use UniqueEntityLoader.load(java.io.Serializable, Object, SessionImplementor, LockOptions) instead. 
org.hibernate.Session.load(String, Serializable, LockMode)
          LockMode parameter should be replaced with LockOptions 
org.hibernate.Session.lock(Object, LockMode)
          instead call buildLockRequest(LockMode).lock(object) 
org.hibernate.Session.lock(String, Object, LockMode)
          instead call buildLockRequest(LockMode).lock(entityName, object) 
org.hibernate.Session.refresh(Object, LockMode)
          LockMode parameter should be replaced with LockOptions 
org.hibernate.sql.Template.renderOrderByStringTemplate(String, Dialect, SQLFunctionRegistry)
          Use Template.renderOrderByStringTemplate(String,ColumnMapper,SessionFactoryImplementor,Dialect,SQLFunctionRegistry) instead 
org.hibernate.sql.Template.renderWhereStringTemplate(String, String, Dialect)
          Only intended for annotations usage; use Template.renderWhereStringTemplate(String, String, Dialect, SQLFunctionRegistry) instead 
org.hibernate.tuple.entity.EntityTuplizer.resetIdentifier(Object, Serializable, Object)
          Use EntityTuplizer.resetIdentifier(Object, Serializable, Object, SessionImplementor) instead 
org.hibernate.tuple.ElementWrapper.setAttributeValue(QName, String)
            
org.hibernate.proxy.dom4j.Dom4jProxy.setAttributeValue(QName, String)
            
org.hibernate.tuple.ElementWrapper.setAttributeValue(String, String)
            
org.hibernate.proxy.dom4j.Dom4jProxy.setAttributeValue(String, String)
            
org.hibernate.id.factory.IdentifierGeneratorFactory.setDialect(Dialect)
          The intention is that Dialect should be required to be specified up-front and it would then get ctor injected. 
org.hibernate.engine.spi.SessionImplementor.setFetchProfile(String)
          use SessionImplementor.getLoadQueryInfluencers() instead 
org.hibernate.ejb.packaging.PersistenceMetadata.setHbmfiles(List)
          use getHbmfiles() rather 
org.hibernate.tuple.entity.EntityTuplizer.setIdentifier(Object, Serializable)
          Use EntityTuplizer.setIdentifier(Object, Serializable, SessionImplementor) instead. 
org.hibernate.sql.Select.setLockMode(LockMode)
          Instead use setLockOptions 
org.hibernate.envers.query.impl.AbstractAuditQuery.setLockMode(LockMode)
          Instead use setLockOptions 
org.hibernate.mapping.Collection.setOwner(PersistentClass)
          Inject the owner into constructor. 
org.hibernate.criterion.Expression.sql(String)
          use Restrictions.sqlRestriction(String) 
org.hibernate.criterion.Expression.sql(String, Object[], Type[])
          use Restrictions.sqlRestriction(String, Object[], Type[]) 
org.hibernate.criterion.Expression.sql(String, Object, Type)
          use Restrictions.sqlRestriction(String, Object, Type) 
 

Deprecated Constructors
org.hibernate.DuplicateMappingException(String, String)
           
org.hibernate.DuplicateMappingException(String, String, String)
           
org.hibernate.engine.spi.NamedSQLQueryDefinition(String, String, List, boolean, String, Integer, Integer, FlushMode, Map, boolean)
            
org.hibernate.tool.hbm2ddl.SchemaExport(Configuration, Properties)
          properties may be specified via the Configuration object 
 

Deprecated Enum Constants
org.hibernate.annotations.CascadeType.DELETE_ORPHAN
          use @OneToOne(orphanRemoval=true) or @OneToMany(orphanRemoval=true) 
org.hibernate.annotations.CascadeType.EVICT
          use javax.persistence.CascadeType.DETACH 
org.hibernate.LockMode.FORCE
          instead use PESSIMISTIC_FORCE_INCREMENT 
org.hibernate.FlushMode.NEVER
          use FlushMode.MANUAL instead. 
org.hibernate.annotations.FlushModeType.NEVER
          use MANUAL, will be removed in a subsequent release 
org.hibernate.LockMode.UPGRADE
          instead use PESSIMISTIC_WRITE 
 

Deprecated Annotation Type Elements
org.hibernate.envers.Audited.auditParents
          Use @AuditOverride(forClass=SomeEntity.class) instead. 
org.hibernate.annotations.Entity.dynamicInsert
          use DynamicInsert instead 
org.hibernate.annotations.Entity.dynamicUpdate
          Use DynamicUpdate instead 
org.hibernate.annotations.Tuplizer.entityMode
          should use #entityModeType instead 
org.hibernate.annotations.Entity.mutable
          use Immutable 
org.hibernate.annotations.Entity.optimisticLock
          use OptimisticLocking instead. 
org.hibernate.annotations.Entity.persister
          use Persister instead 
org.hibernate.annotations.Entity.polymorphism
          use Polymorphism instead 
org.hibernate.annotations.Entity.selectBeforeUpdate
          Use SelectBeforeUpdate instead 
 



Copyright © 2001-2012 Red Hat, Inc. All Rights Reserved.