Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

org.springframework.orm.hibernate.support.* (7)org.springframework.orm.hibernate3.support.* (7)

org.springframework.orm.hibernate: Javadoc index of package org.springframework.orm.hibernate.


Package Samples:

org.springframework.orm.hibernate.support: Package providing integration of Hibernate 2.1 with Spring concepts.  
org.springframework.orm.hibernate3.support: Package providing integration of Hibernate3 with Spring concepts.  

Classes:

HibernateTransactionManager: PlatformTransactionManager implementation for a single Hibernate SessionFactory. Binds a Hibernate Session from the specified factory to the thread, potentially allowing for one thread Session per factory. SessionFactoryUtils and HibernateTemplate are aware of thread-bound Sessions and participate in such transactions automatically. Using either is required for Hibernate access code that needs to support this transaction handling mechanism. Supports custom isolation levels, and timeouts that get applied as appropriate Hibernate query timeouts. To support the latter, application code must either ...
HibernateTransactionManager: PlatformTransactionManager implementation for a single Hibernate SessionFactory. Binds a Hibernate Session from the specified factory to the thread, potentially allowing for one thread Session per factory. SessionFactoryUtils and HibernateTemplate are aware of thread-bound Sessions and participate in such transactions automatically. Using either is required for Hibernate access code that needs to support this transaction handling mechanism. Supports custom isolation levels, and timeouts that get applied as appropriate Hibernate query timeouts. To support the latter, application code must either ...
HibernateTemplate: Helper class that simplifies Hibernate data access code, and converts checked HibernateExceptions into unchecked DataAccessExceptions, following the org.springframework.dao exception hierarchy. Uses the same SQLExceptionTranslator mechanism as JdbcTemplate. Typically used to implement data access or business logic services that use Hibernate within their implementation but are Hibernate-agnostic in their interface. The latter or code calling the latter only have to deal with domain objects, query objects, and org.springframework.dao exceptions. The central method is "execute", supporting Hibernate ...
HibernateTemplate: Helper class that simplifies Hibernate data access code, and converts checked HibernateExceptions into unchecked DataAccessExceptions, following the org.springframework.dao exception hierarchy. Uses the same SQLExceptionTranslator mechanism as JdbcTemplate. Typically used to implement data access or business logic services that use Hibernate within their implementation but are Hibernate-agnostic in their interface. The latter or code calling the latter only have to deal with domain objects, query objects, and org.springframework.dao exceptions. The central method is "execute", supporting Hibernate ...
OpenSessionInViewFilter: Servlet 2.3 Filter that binds a Hibernate Session to the thread for the entire processing of the request. Intended for the "Open Session in View" pattern, i.e. to allow for lazy loading in web views despite the original transactions already being completed. This filter works similar to the AOP HibernateInterceptor: It just makes Hibernate Sessions available via the thread. It is suitable for non-transactional execution but also for middle tier transactions via HibernateTransactionManager or JtaTransactionManager. In the latter case, Sessions pre-bound by this filter will automatically be used for ...
OpenSessionInViewFilter: Servlet 2.3 Filter that binds a Hibernate Session to the thread for the entire processing of the request. Intended for the "Open Session in View" pattern, i.e. to allow for lazy loading in web views despite the original transactions already being completed. This filter works similar to the AOP HibernateInterceptor: It just makes Hibernate Sessions available via the thread. It is suitable for non-transactional execution but also for middle tier transactions via HibernateTransactionManager or JtaTransactionManager. In the latter case, Sessions pre-bound by this filter will automatically be used for ...
OpenSessionInViewInterceptor: Spring web HandlerInterceptor that binds a Hibernate Session to the thread for the entire processing of the request. Intended for the "Open Session in View" pattern, i.e. to allow for lazy loading in web views despite the original transactions already being completed. This interceptor works similar to the AOP HibernateInterceptor: It just makes Hibernate Sessions available via the thread. It is suitable for non-transactional execution but also for middle tier transactions via HibernateTransactionManager or JtaTransactionManager. In the latter case, Sessions pre-bound by this interceptor will automatically ...
OpenSessionInViewInterceptor: Spring web HandlerInterceptor that binds a Hibernate Session to the thread for the entire processing of the request. Intended for the "Open Session in View" pattern, i.e. to allow for lazy loading in web views despite the original transactions already being completed. This interceptor works similar to the AOP HibernateInterceptor: It just makes Hibernate Sessions available via the thread. It is suitable for non-transactional execution but also for middle tier transactions via HibernateTransactionManager or JtaTransactionManager. In the latter case, Sessions pre-bound by this interceptor will automatically ...
LocalSessionFactoryBean: FactoryBean that creates a local Hibernate SessionFactory instance. Behaves like a SessionFactory instance when used as bean reference, e.g. for HibernateTemplate's "sessionFactory" property. Note that switching to JndiObjectFactoryBean is just a matter of configuration! The typical usage will be to register this as singleton factory (for a certain underlying JDBC DataSource) in an application context, and give bean references to application services that need it. Configuration settings can either be read from a Hibernate XML file, specified as "configLocation", or completely via this class. A ...
LocalSessionFactoryBean: FactoryBean that creates a local Hibernate SessionFactory instance. Behaves like a SessionFactory instance when used as bean reference, e.g. for HibernateTemplate's "sessionFactory" property. Note that switching to JndiObjectFactoryBean is just a matter of configuration! The typical usage will be to register this as singleton factory (for a certain underlying JDBC DataSource) in an application context, and give bean references to application services that need it. Configuration settings can either be read from a Hibernate XML file, specified as "configLocation", or completely via this class. A ...
HibernateInterceptor: This interceptor binds a new Hibernate Session to the thread before a method call, closing and removing it afterwards in case of any method outcome. If there already was a pre-bound Session (e.g. from HibernateTransactionManager, or from a surrounding Hibernate-intercepted method), the interceptor simply takes part in it. Application code must retrieve a Hibernate Session via SessionFactoryUtils' getSession method, to be able to detect a thread-bound Session. It is preferable to use getSession with allowCreate=false, as the code relies on the interceptor to provide proper Session handling. Typically ...
HibernateInterceptor: This interceptor binds a new Hibernate Session to the thread before a method call, closing and removing it afterwards in case of any method outcome. If there already was a pre-bound Session (e.g. from HibernateTransactionManager, or from a surrounding Hibernate-intercepted method), the interceptor simply takes part in it. Application code must retrieve a Hibernate Session via SessionFactoryUtils' getSession method, to be able to detect a thread-bound Session. It is preferable to use getSession with allowCreate=false, as the code relies on the interceptor to provide proper Session handling. Typically ...
FilterDefinitionFactoryBean: Convenient FactoryBean for defining Hibernate FilterDefinitions. Exposes a corresponding Hibernate FilterDefinition object. Typically defined as inner bean within a LocalSessionFactoryBean definition, as list element for the "filterDefinitions" bean property. For example: <bean id="sessionFactory" class="org.springframework.orm.hibernate3.LocalSessionFactoryBean"> ... <property name="filterDefinitions"> <list> <bean class="org.springframework.orm.hibernate3.FilterDefinitionFactoryBean"> <property name="filterName"><value>myFilter</value></property> ...
HibernateOperations: Interface that specifies a basic set of Hibernate operations. Implemented by HibernateTemplate. Not often used, but a useful option to enhance testability, as it can easily be mocked or stubbed. Provides HibernateTemplate's data access methods that mirror various Session methods. See the Hibernate Session javadocs for details on those methods. Note that operations that return an Iterator (i.e. iterate ) are supposed to be used within Spring-driven or JTA-driven transactions (with HibernateTransactionManager, JtaTransactionManager, or EJB CMT). Else, the Iterator won't be able to read results from ...
HibernateOperations: Interface that specifies a basic set of Hibernate operations. Implemented by HibernateTemplate. Not often used, but a useful option to enhance testability, as it can easily be mocked or stubbed. Provides HibernateTemplate's data access methods that mirror various Session methods. See the Hibernate Session javadocs for details on those methods. Note that operations that return an Iterator (i.e. iterate ) are supposed to be used within Spring-driven or JTA-driven transactions (with HibernateTransactionManager, JtaTransactionManager, or EJB CMT). Else, the Iterator won't be able to read results from ...
HibernateCallback: Callback interface for Hibernate code. To be used with HibernateTemplate's execute method, assumably often as anonymous classes within a method implementation. The typical implementation will call Session.load/find/save/update to perform some operations on persistent objects. It can also perform direct JDBC operations via Hibernate's Session.connection() method, returning the active JDBC connection. Note that Hibernate works on unmodified plain Java objects, performing dirty detection via copies made at load time. Returned objects can thus be used outside of an active Hibernate Session without ...
HibernateCallback: Callback interface for Hibernate code. To be used with HibernateTemplate's execute method, assumably often as anonymous classes within a method implementation. The typical implementation will call Session.load/find/save/update to perform some operations on persistent objects. It can also perform direct JDBC operations via Hibernate's Session.connection() method, returning the active JDBC connection. Note that Hibernate works on unmodified plain Java objects, performing dirty detection via copies made at load time. Returned objects can thus be used outside of an active Hibernate Session without ...
HibernateDaoSupport: Convenient super class for Hibernate data access objects. Requires a SessionFactory to be set, providing a HibernateTemplate based on it to subclasses. Can alternatively be initialized directly via a HibernateTemplate, to reuse the latter's settings like SessionFactory, exception translator, flush mode, etc. This base class is mainly intended for HibernateTemplate usage but can also be used when working with SessionFactoryUtils directly, e.g. in combination with HibernateInterceptor-managed Sessions. Convenience getSession and closeSessionIfNecessary methods are provided for that usage style. This ...
HibernateDaoSupport: Convenient super class for Hibernate data access objects. Requires a SessionFactory to be set, providing a HibernateTemplate based on it to subclasses. Can alternatively be initialized directly via a HibernateTemplate, to reuse the latter's settings like SessionFactory, exception translator, flush mode, etc. This base class is mainly intended for HibernateTemplate usage but can also be used when working with SessionFactoryUtils directly, e.g. in combination with HibernateInterceptor-managed Sessions. Convenience getSession and closeSessionIfNecessary methods are provided for that usage style. This ...
LocalTransactionManagerLookup: Implementation of Hibernate's TransactionManagerLookup interface that returns a Spring-managed JTA TransactionManager, determined by LocalSessionFactoryBean's "transactionManager" property. The main advantage of this TransactionManagerLookup is that it avoids double configuration of JTA specifics. A single TransactionManager bean can be used for both JtaTransactionManager and LocalSessionFactoryBean, with no JTA setup in Hibernate configuration. Alternatively, use Hibernate's own TransactionManagerLookup implementations: Spring's JtaTransactionManager only requires a TransactionManager for suspending ...
LocalTransactionManagerLookup: Implementation of Hibernate's TransactionManagerLookup interface that returns a Spring-managed JTA TransactionManager, determined by LocalSessionFactoryBean's "transactionManager" property. The main advantage of this TransactionManagerLookup is that it avoids double configuration of JTA specifics. A single TransactionManager bean can be used for both JtaTransactionManager and LocalSessionFactoryBean, with no JTA setup in Hibernate configuration. Alternatively, use Hibernate's own TransactionManagerLookup implementations: Spring's JtaTransactionManager only requires a TransactionManager for suspending ...
SessionFactoryUtils: Helper class featuring methods for Hibernate session handling, allowing for reuse of Hibernate Session instances within transactions. Supports synchronization with both Spring-managed JTA transactions (i.e. JtaTransactionManager) and non-Spring JTA transactions (i.e. plain JTA or EJB CMT). See the getSession version with all parameters for details. Used internally by HibernateTemplate, HibernateInterceptor, and HibernateTransactionManager. Can also be used directly in application code, e.g. in combination with HibernateInterceptor. Note: Spring's Hibernate support requires Hibernate 2.1 (as of ...
ClobStringType: Hibernate UserType implementation for Strings that get mapped to CLOBs. Retrieves the LobHandler to use from LocalSessionFactoryBean at config time. Particularly useful for storing Strings with more than 4000 characters in an Oracle database (only possible via CLOBs), in combination with OracleLobHandler. Can also be defined in generic Hibernate mappings, as DefaultLobCreator will work with most JDBC-compliant database drivers. In this case, the field type does not have to be BLOB: For databases like MySQL and MS SQL Server, any large enough binary type will work.
ClobStringType: Hibernate UserType implementation for Strings that get mapped to CLOBs. Retrieves the LobHandler to use from LocalSessionFactoryBean at config time. Particularly useful for storing Strings with more than 4000 characters in an Oracle database (only possible via CLOBs), in combination with OracleLobHandler. Can also be defined in generic Hibernate mappings, as DefaultLobCreator will work with most JDBC-compliant database drivers. In this case, the field type does not have to be BLOB: For databases like MySQL and MS SQL Server, any large enough binary type will work.
SessionFactoryUtils: Helper class featuring methods for Hibernate session handling, allowing for reuse of Hibernate Session instances within transactions. Supports synchronization with both Spring-managed JTA transactions (i.e. JtaTransactionManager) and non-Spring JTA transactions (i.e. plain JTA or EJB CMT). See the getSession version with all parameters for details. Used internally by HibernateTemplate, HibernateInterceptor, and HibernateTransactionManager. Can also be used directly in application code, e.g. in combination with HibernateInterceptor.

Home | Contact Us | Privacy Policy | Terms of Service