Programming Tutorials

Hibernate Tutorials

11. Tuplizers (org.hibernate.tuple.Tuplizer) in Hibernate

By: Dorris : 2011-01-01

Description: org.hibernate.tuple.Tuplizer and its sub-interfaces are responsible for managing a particular representation of a piece of data given that representation's org.hibernate.EntityMode. If a given piece of data is thought of as a data structure, then a tuplizer is the thing that knows how to create such a data structure, how to extract values from such a data structure and how to inject values into such a data structure. For example, for the POJO entity mode, the corresponding tuplizer knows how create the POJO through its constructor. It also knows how to access the POJO properties using the defined property accessors.


12. equals() and hashCode() in Hibernate

By: Dorris : 2011-01-01

Description: Hibernate guarantees equivalence of persistent identity (database row) and Java identity only inside a particular session scope. When you mix instances retrieved in different sessions, you must implement equals() and hashCode() if you wish to have meaningful semantics for Sets.


13. Fetching strategies in Hibernate

By: Dorris : 2011-01-01

Description: Hibernate uses a fetching strategy to retrieve associated objects if the application needs to navigate the association. Fetch strategies can be declared in the O/R mapping metadata, or over-ridden by a particular HQL or Criteria query.


14. Hibernate Configuration Properties

By: Felix : 2010-12-29

Description: The table below lists the Hibernate Configuration Properties and their purpose. For easier understanding, and example is also provided for each property.


15. Hibernate Transaction Properties

By: Felix : 2010-12-29

Description: The table below lists the Hibernate Transaction Properties and their purpose. For easier understanding, and example is also provided for each property


16. Hibernate Cache Properties

By: Felix : 2010-12-29

Description: The table below lists the Hibernate Cache Properties and their purpose. For easier understanding, and example is also provided for each property.


17. Hibernate JDBC and Connection Properties

By: Felix : 2010-12-29

Description: The table below lists the Hibernate JDBC and Connection Properties and their purpose. For easier understanding, and example is also provided for each property.


18. Creating Connection Pool for JDBC Connections in Hibernate

By: Felix : 2010-12-29

Description: Hibernate's own connection pooling algorithm is, however, quite rudimentary. It is intended to help you get started and is not intended for use in a production system, or even for performance testing. You should use a third party pool for best performance and stability. Just replace the hibernate.connection.pool_size property with connection pool specific settings. This will turn off Hibernate's internal pool. For example, you might like to use c3p0.


19. SessionFactory in Hibernate

By: Felix : 2010-12-29

Description: When all mappings have been parsed by the org.hibernate.cfg.Configuration, the application must obtain a factory for org.hibernate.Session instances. This factory is intended to be shared by all application threads:


20. Contextual sessions in Hibernate

By: Felix : 2010-12-29

Description: Most applications using Hibernate need some form of "contextual" session, where a given session is in effect throughout the scope of a given context. However, across applications the definition of what constitutes a context is typically different; different contexts define different scopes to the notion of current. Applications using Hibernate prior to version 3.0 tended to utilize either home-grown ThreadLocal-based contextual sessions, helper classes such as HibernateUtil, or utilized third-party frameworks, such as Spring or Pico, which provided proxy/interception-based contextual sessions.