Deprecated API


Contents
Deprecated Interfaces
org.hibernate.cache.Cache
          As of 3.3; see for details. 
org.hibernate.cache.CacheConcurrencyStrategy
          As of 3.3; see for details. 
org.hibernate.cache.CacheProvider
          As of 3.3; see for details. 
org.hibernate.hql.ast.tree.ParameterContainer
            
 

Deprecated Classes
org.hibernate.type.ByteArrayBlobType
          replaced by Hibernate Core's WrappedMaterializedBlobType 
org.hibernate.ejb.CurrentEntityManagerImpl
          no longer used since getEntityManager is no longer here 
org.hibernate.criterion.Expression
          Use Restrictions. 
org.hibernate.cfg.search.HibernateSearchEventListenerRegister
          as of release 3.4.0.CR2, replaced by Hibernate Search's org.hibernate.search.cfg.EventListenerRegister 
org.hibernate.cache.jbc2.JBossCacheRegionFactory
          use JBossCacheRegionFactory 
org.hibernate.cache.jbc2.JndiMultiplexedJBossCacheRegionFactory
          use JndiMultiplexedJBossCacheRegionFactory 
org.hibernate.cache.jbc2.JndiSharedJBossCacheRegionFactory
          use JndiSharedJBossCacheRegionFactory 
org.hibernate.cache.jbc2.MultiplexedJBossCacheRegionFactory
          use MultiplexedJBossCacheRegionFactory 
org.hibernate.dialect.Oracle9Dialect
          Use either Oracle9iDialect or Oracle10gDialect instead 
org.hibernate.dialect.OracleDialect
          Use Oracle8iDialect instead. 
org.hibernate.type.PrimitiveByteArrayBlobType
          replaced by Hibernate Core's MaterializedBlobType 
org.hibernate.lob.ReaderInputStream
          Should not be used anymore. 
org.hibernate.cache.jbc2.SharedJBossCacheRegionFactory
          use SharedJBossCacheRegionFactory 
org.hibernate.type.StringClobType
          replaced by Hibernate Core's MaterializedClobType 
org.hibernate.dialect.SybaseDialect
          use AbstractTransactSQLDialect, SybaseASE15Dialect or SQLServerDialect instead depending on need. 
 

Deprecated Annotation Types
org.hibernate.annotations.CollectionOfElements
          use @ElementCollection 
org.hibernate.annotations.MapKey
          Use MapKeyColumn This is the default behavior for Map properties marked as @OneToMany, @ManyToMany or @ElementCollection 
org.hibernate.annotations.MapKeyManyToMany
          Use MapKeyJoinColumn MapKeyJoinColumns This is the default behavior for Map properties marked as @OneToMany, @ManyToMany or @ElementCollection 
 

Deprecated Fields
org.hibernate.FetchMode.EAGER
          use FetchMode.JOIN 
org.hibernate.LockMode.FORCE
          instead use PESSIMISTIC_FORCE_INCREMENT 
org.hibernate.ejb.QueryHints.HINT_TIMEOUT
          HINT_TIMEOUT (org.hibernate.timeout), instead use SPEC_HINT_TIMEOUT (javax.persistence.query.timeout) 
org.hibernate.FetchMode.LAZY
          use FetchMode.SELECT 
org.hibernate.FlushMode.NEVER
          use FlushMode.MANUAL instead. 
org.hibernate.LockMode.UPGRADE
          instead use PESSIMISTIC_WRITE 
 

Deprecated Methods
org.hibernate.cfg.ExtendedMappings.addUniqueConstraints(Table, List)
          Use ExtendedMappings.addUniqueConstraintHolders(org.hibernate.mapping.Table, java.util.List) instead 
org.hibernate.cfg.annotations.TableBinder.buildUniqueConstraints(UniqueConstraint[])
          Use TableBinder.buildUniqueConstraintHolders(javax.persistence.UniqueConstraint[]) instead 
org.hibernate.jdbc.Batcher.closeConnection(Connection)
          Obtain connections from ConnectionProvider instead 
org.hibernate.Session.connection()
          (scheduled for removal in 4.x). Replacement depends on need; for doing direct JDBC stuff use Session.doWork(org.hibernate.jdbc.Work); for opening a 'temporary Session' use (TBD). 
org.hibernate.hql.ast.util.ASTUtil.create(ASTFactory, int, String)
          silly 
org.hibernate.Hibernate.createBlob(byte[])
          Use Hibernate.createBlob(byte[], Session) instead 
org.hibernate.Hibernate.createBlob(InputStream)
          Use Hibernate.createBlob(InputStream, long, Session) instead 
org.hibernate.Hibernate.createBlob(InputStream, int)
          Use Hibernate.createBlob(InputStream, long, Session) instead 
org.hibernate.Hibernate.createBlob(InputStream, long)
          Use Hibernate.createBlob(InputStream, long, Session) instead 
org.hibernate.Hibernate.createClob(Reader, int)
          Use Hibernate.createClob(Reader,long,Session) instead 
org.hibernate.Hibernate.createClob(Reader, long)
          Use Hibernate.createClob(Reader,long,Session) instead 
org.hibernate.Hibernate.createClob(String)
          Use Hibernate.createClob(String, Session) instead 
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.classic.Session.createSQLQuery(String, String[], Class[])
          will be replaced with a more Query like interface in later release 
org.hibernate.classic.Session.createSQLQuery(String, String, Class)
          will be replaced with a more Query like interface in later release 
org.hibernate.type.TypeFactory.customCollection(String, String, String, boolean)
          Use TypeFactory.customCollection(String, java.util.Properties, String, String, boolean) instead 
org.hibernate.classic.Session.delete(String)
          consider using HQL delete statements 
org.hibernate.classic.Session.delete(String, Object[], Type[])
          consider using HQL delete statements 
org.hibernate.classic.Session.delete(String, Object, Type)
          consider using HQL delete statements 
org.hibernate.cfg.search.HibernateSearchEventListenerRegister.enableHibernateSearch(EventListeners, Properties)
          as of release 3.4.0.CR2, replaced by Hibernate Search's org.hibernate.search.cfg.EventListenerRegister#enableHibernateSearch(EventListeners, Properties) 
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, ExtendedMappings)
          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.ExtendedMappings, java.lang.String) instead. 
org.hibernate.classic.Session.filter(Object, String)
          use Session.createFilter(Object, String).Query.list() 
org.hibernate.classic.Session.filter(Object, String, Object[], Type[])
          use Session.createFilter(Object, String).setXYZ.Query.list() 
org.hibernate.classic.Session.filter(Object, String, Object, Type)
          use Session.createFilter(Object, String).setXYZ.Query.list() 
org.hibernate.classic.Session.find(String)
          use Session.createQuery(java.lang.String).Query.list() 
org.hibernate.classic.Session.find(String, Object[], Type[])
          use Session.createQuery(java.lang.String).setXYZ.Query.list() 
org.hibernate.classic.Session.find(String, Object, Type)
          use Session.createQuery(java.lang.String).setXYZ.Query.list() 
org.hibernate.Session.get(Class, Serializable, LockMode)
          LockMode parameter should be replaced with LockOptions 
org.hibernate.type.ClobType.get(ResultSet, String)
          Use ClobType.get(ResultSet,String,LobCreator) instead 
org.hibernate.type.BlobType.get(ResultSet, String)
          Use BlobType.get(ResultSet,String,LobCreator) instead 
org.hibernate.Session.get(String, Serializable, LockMode)
          LockMode parameter should be replaced with LockOptions 
org.hibernate.hql.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.ast.tree.ConstructorNode.getDataType()
          (tell clover to ignore this method) 
org.hibernate.engine.SessionImplementor.getEnabledFilters()
          use #getLoadQueryInfluencers instead 
org.hibernate.engine.SessionImplementor.getFetchProfile()
          use #getLoadQueryInfluencers instead 
org.hibernate.engine.SessionImplementor.getFilterParameterType(String)
          use #getLoadQueryInfluencers instead 
org.hibernate.engine.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, EntityMode)
          Use ClassMetadata.getIdentifier(Object,SessionImplementor) instead 
org.hibernate.persister.entity.EntityPersister.getIdentifier(Object, EntityMode)
          Use EntityPersister.getIdentifier(Object,SessionImplementor) instead 
org.hibernate.engine.Mapping.getIdentifierGeneratorFactory()
          temporary solution 
org.hibernate.engine.jdbc.JdbcSupport.getLobCreator()
          Use JdbcSupport.getLobCreator(LobCreationContext) instead. 
org.hibernate.sql.Select.getLockMode()
          Instead use getLockOptions 
org.hibernate.event.AbstractPreDatabaseOperationEvent.getSource()
          Use AbstractEvent.getSession() instead 
org.hibernate.cfg.ExtendedMappings.getTableUniqueConstraints()
          Use ExtendedMappings.getUniqueConstraintHoldersByTable() instead 
org.hibernate.tuple.entity.EntityTuplizer.instantiate(Serializable)
          Use EntityTuplizer.instantiate(Serializable, SessionImplementor) instead. 
org.hibernate.metadata.ClassMetadata.instantiate(Serializable, EntityMode)
          Use ClassMetadata.instantiate(Serializable, SessionImplementor) instead 
org.hibernate.persister.entity.EntityPersister.instantiate(Serializable, EntityMode)
          Use EntityPersister.instantiate(Serializable, SessionImplementor) instead 
org.hibernate.classic.Session.iterate(String)
          use Session.createQuery(java.lang.String).Query.iterate() 
org.hibernate.classic.Session.iterate(String, Object[], Type[])
          use Session.createQuery(java.lang.String).setXYZ.Query.iterate() 
org.hibernate.classic.Session.iterate(String, Object, Type)
          use Session.createQuery(java.lang.String).setXYZ.Query.iterate() 
org.hibernate.cfg.Environment.jvmHasJDK14Timestamp()
          Starting with 3.3 Hibernate requires JDK 1.4 or higher 
org.hibernate.cfg.Environment.jvmSupportsGetGeneratedKeys()
          Starting with 3.3 Hibernate requires JDK 1.4 or higher 
org.hibernate.cfg.Environment.jvmSupportsLinkedHashCollections()
          Starting with 3.3 Hibernate requires JDK 1.4 or higher 
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.type.TypeFactory.manyToOne(String, String, boolean, boolean, boolean, boolean)
          Use TypeFactory.manyToOne(String, String, boolean, boolean, boolean, boolean, boolean) 
org.hibernate.jdbc.Batcher.openConnection()
          Obtain connections from ConnectionProvider instead 
org.hibernate.Session.reconnect()
          Manual reconnection is only needed in the case of application-supplied connections, in which case the Session.reconnect(java.sql.Connection) for should be used. 
org.hibernate.Session.refresh(Object, LockMode)
          LockMode parameter should be replaced with LockOptions 
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.persister.entity.EntityPersister.resetIdentifier(Object, Serializable, Object, EntityMode)
          Use EntityPersister.resetIdentifier(Object, Serializable, Object, SessionImplementor) instead 
org.hibernate.classic.Session.save(Object, Serializable)
          declare identifier properties for all classes 
org.hibernate.classic.Session.save(String, Object, Serializable)
          declare identifier properties for all classes 
org.hibernate.classic.Session.saveOrUpdateCopy(Object)
          use Session.merge(Object) 
org.hibernate.classic.Session.saveOrUpdateCopy(Object, Serializable)
          with no replacement 
org.hibernate.classic.Session.saveOrUpdateCopy(String, Object)
          use Session.merge(String, Object) 
org.hibernate.classic.Session.saveOrUpdateCopy(String, Object, Serializable)
          with no replacement 
org.hibernate.proxy.dom4j.Dom4jProxy.setAttributeValue(QName, String)
            
org.hibernate.tuple.ElementWrapper.setAttributeValue(QName, String)
            
org.hibernate.proxy.dom4j.Dom4jProxy.setAttributeValue(String, String)
            
org.hibernate.tuple.ElementWrapper.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.SessionImplementor.setFetchProfile(String)
          use #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.metadata.ClassMetadata.setIdentifier(Object, Serializable, EntityMode)
          Use ClassMetadata.setIdentifier(Object, Serializable, SessionImplementor) instead. 
org.hibernate.persister.entity.EntityPersister.setIdentifier(Object, Serializable, EntityMode)
          Use EntityPersister.setIdentifier(Object, Serializable, SessionImplementor) instead. 
org.hibernate.envers.query.impl.AbstractAuditQuery.setLockMode(LockMode)
          Instead use setLockOptions 
org.hibernate.sql.Select.setLockMode(LockMode)
          Instead use setLockOptions 
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) 
org.hibernate.classic.Session.update(Object, Serializable)
          declare identifier properties for all classes 
org.hibernate.classic.Session.update(String, Object, Serializable)
          declare identifier properties for all classes 
 

Deprecated Constructors
org.hibernate.type.ManyToOneType(String, String, boolean, boolean, boolean, boolean)
          use ManyToOneType.ManyToOneType(String, String, boolean, boolean, boolean, boolean, boolean) 
org.hibernate.engine.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.annotations.FlushModeType.NEVER
          use MANUAL, will be removed in a subsequent release 
 



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