接口的使用
org.hibernate.Session
-
使用Session的程序包 程序包 说明 org.hibernate This package defines the central Hibernate APIs.org.hibernate.boot.internal org.hibernate.classic This package implements backward-compatibility with Hibernate 2.1 APIs now deprecated in Hibernate3.org.hibernate.context.internal Internal implementations and support around "current session" handling.org.hibernate.context.spi SPI level contracts around "current session" support.org.hibernate.criterion A framework for defining restriction criteria and order criteria.org.hibernate.engine.spi org.hibernate.event.spi org.hibernate.graph Hibernate's (extended) support for JPA's entity graphsorg.hibernate.internal An internal package containing mostly implementations of central Hibernate APIs.org.hibernate.jpa org.hibernate.procedure org.hibernate.tuple This package defines a runtime metamodel for entities at the object level and abstracts the differences between the various entity modes. -
-
org.hibernate中Session的使用
返回Session的org.hibernate中的方法 修饰符和类型 方法 说明 SessionSessionFactory. getCurrentSession()Obtains the current session.SessionSessionBuilder. openSession()Opens a session with the specified options.SessionSessionFactory. openSession()Open aSession.参数类型为Session的org.hibernate中的方法 修饰符和类型 方法 说明 booleanCustomEntityDirtinessStrategy. canDirtyCheck(Object entity, EntityPersister persister, Session session)Is this strategy capable of telling whether the given entity is dirty?voidCustomEntityDirtinessStrategy. findDirty(Object entity, EntityPersister persister, Session session, CustomEntityDirtinessStrategy.DirtyCheckContext dirtyCheckContext)Callback used to hook into Hibernate algorithm for determination of which attributes have changed.static LobCreatorHibernate. getLobCreator(Session session)Obtain a lob creator for the given session.booleanCustomEntityDirtinessStrategy. isDirty(Object entity, EntityPersister persister, Session session)The callback used by Hibernate to determine if the given entity is dirty.voidCustomEntityDirtinessStrategy. resetDirty(Object entity, EntityPersister persister, Session session)Callback used by Hibernate to signal that the entity dirty flag should be cleared. -
org.hibernate.boot.internal中Session的使用
参数类型为Session的org.hibernate.boot.internal中的方法 修饰符和类型 方法 说明 booleanDefaultCustomEntityDirtinessStrategy. canDirtyCheck(Object entity, EntityPersister persister, Session session)voidDefaultCustomEntityDirtinessStrategy. findDirty(Object entity, EntityPersister persister, Session session, CustomEntityDirtinessStrategy.DirtyCheckContext dirtyCheckContext)booleanDefaultCustomEntityDirtinessStrategy. isDirty(Object entity, EntityPersister persister, Session session)voidDefaultCustomEntityDirtinessStrategy. resetDirty(Object entity, EntityPersister persister, Session session) -
org.hibernate.classic中Session的使用
参数类型为Session的org.hibernate.classic中的方法 修饰符和类型 方法 说明 booleanLifecycle. onDelete(Session s)Called when an entity is deleted.voidLifecycle. onLoad(Session s, Serializable id)Called after an entity is loaded.booleanLifecycle. onSave(Session s)Called when an entity is saved.booleanLifecycle. onUpdate(Session s)Called when an entity is passed to Session.update(). -
org.hibernate.context.internal中Session的使用
返回Session的org.hibernate.context.internal中的方法 修饰符和类型 方法 说明 static SessionManagedSessionContext. bind(Session session)Binds the given session to the current context for its session factory.protected SessionJTASessionContext. buildOrObtainSession()Strictly provided for subclassing purposes; specifically to allow long-session support.protected SessionThreadLocalSessionContext. buildOrObtainSession()Strictly provided for sub-classing purposes; specifically to allow long-session support.SessionJTASessionContext. currentSession()SessionManagedSessionContext. currentSession()SessionThreadLocalSessionContext. currentSession()static SessionManagedSessionContext. unbind(SessionFactory factory)Unbinds the session (if one) current associated with the context for the given session.static SessionThreadLocalSessionContext. unbind(SessionFactory factory)Disassociates a previously bound session from the current thread of execution.protected SessionThreadLocalSessionContext. wrap(Session session)返回变量类型为Session的类型的org.hibernate.context.internal中的方法 修饰符和类型 方法 说明 protected static Map<SessionFactory,Session>ManagedSessionContext. sessionMap()protected static Map<SessionFactory,Session>ThreadLocalSessionContext. sessionMap()参数类型为Session的org.hibernate.context.internal中的方法 修饰符和类型 方法 说明 static SessionManagedSessionContext. bind(Session session)Binds the given session to the current context for its session factory.static voidThreadLocalSessionContext. bind(Session session)Associates the given session with the current thread of execution.protected SessionThreadLocalSessionContext. wrap(Session session) -
org.hibernate.context.spi中Session的使用
返回Session的org.hibernate.context.spi中的方法 修饰符和类型 方法 说明 SessionCurrentSessionContext. currentSession()Retrieve the current session according to the scoping defined by this implementation.参数类型为Session的org.hibernate.context.spi中的方法 修饰符和类型 方法 说明 protected voidAbstractCurrentSessionContext. validateExistingSession(Session existingSession) -
org.hibernate.criterion中Session的使用
参数类型为Session的org.hibernate.criterion中的方法 修饰符和类型 方法 说明 CriteriaDetachedCriteria. getExecutableCriteria(Session session)Get an executable instance of Criteria to actually run the query. -
org.hibernate.engine.spi中Session的使用
org.hibernate.engine.spi中Session的子接口 修饰符和类型 接口 说明 interfaceSessionImplementorDefines the "internal contract" forSessionand other parts of Hibernate such asType,EntityPersisterandCollectionPersisterimplementations.实现Session的org.hibernate.engine.spi中的类 修饰符和类型 类 说明 classSessionDelegatorBaseImplThis class is meant to be extended.返回Session的org.hibernate.engine.spi中的方法 修饰符和类型 方法 说明 SessionSessionFactoryDelegatingImpl. getCurrentSession()SessionAbstractDelegatingSessionBuilder. openSession()SessionAbstractDelegatingSharedSessionBuilder. openSession()SessionSessionFactoryDelegatingImpl. openSession()SessionSessionFactoryDelegatingImpl. openTemporarySession()SessionSessionFactoryImplementor. openTemporarySession()Get a non-transactional "current" session (used by hibernate-envers)参数类型为Session的org.hibernate.engine.spi中的构造器 构造器 说明 SessionDelegatorBaseImpl(SessionImplementor delegate, Session session)已过时。(since 5.3) SessionDelegatorBaseImpl should take just one argument, the SessionImplementor. -
org.hibernate.event.spi中Session的使用
org.hibernate.event.spi中Session的子接口 修饰符和类型 接口 说明 interfaceEventSource -
org.hibernate.graph中Session的使用
参数类型为Session的org.hibernate.graph中的方法 修饰符和类型 方法 说明 static <T> javax.persistence.EntityGraph<T>EntityGraphs. merge(Session session, Class<T> rootType, Graph<T>... graphs) -
org.hibernate.internal中Session的使用
实现Session的org.hibernate.internal中的类 修饰符和类型 类 说明 classAbstractSessionImplFunctionality common to stateless and stateful sessionsclassSessionImplConcrete implementation of a Session.返回Session的org.hibernate.internal中的方法 修饰符和类型 方法 说明 SessionSessionFactoryImpl. createEntityManager()SessionSessionFactoryImpl. createEntityManager(Map map)SessionSessionFactoryImpl. createEntityManager(javax.persistence.SynchronizationType synchronizationType)SessionSessionFactoryImpl. createEntityManager(javax.persistence.SynchronizationType synchronizationType, Map map)SessionSessionFactoryImpl. getCurrentSession()SessionSessionFactoryImpl. openSession()SessionSessionFactoryImpl.SessionBuilderImpl. openSession()SessionSessionFactoryImpl. openTemporarySession() -
org.hibernate.jpa中Session的使用
返回Session的org.hibernate.jpa中的方法 修饰符和类型 方法 说明 SessionHibernateEntityManager. getSession()已过时。Retrieve a reference to the HibernateSessionused by thisEntityManager. -
org.hibernate.procedure中Session的使用
参数类型为Session的org.hibernate.procedure中的方法 修饰符和类型 方法 说明 default ProcedureCallProcedureCallMemento. makeProcedureCall(Session session)Convert the memento back into an executable (connected) form. -
org.hibernate.tuple中Session的使用
参数类型为Session的org.hibernate.tuple中的方法 修饰符和类型 方法 说明 TValueGenerator. generateValue(Session session, Object owner)Generate the value.
-