Posts

Showing posts with the label ORM

Types of hibernate bean states

As of we know hibernate follows the ORM features, Java bean class maps with database table. While mapping java bean class with database table it traverse through different types of states. That are Transient, Persistent and Detached states.   Different states of POJO class object: 1. Transient state: Object is created by programmer with data. But is doesn't represent any table row. This object does not contains any primary key value. The object which is created for POJO class and which is not under control of hibernate application resides in transient state. 2. Persistent state: The object that represents table row with primary key and managed under control of hibernate software is called as persistent state. This object will be in synchronization with table row.  H ibernate application developer's uses this kind of object in persistent logic development. 3. Detached state: when session is closed persistent context will be destroyed and all the obj...

ORM features in hibernate

Image
Hibernate is Object Relational Mapping(ORM) framework. Hibernate has the advantages while comparing with JDBC. That advantages will make developer life will be easy were implementing or maintaining the java application. Hibernate ORM features are, Hibernate gives the support of POJO/POJI model programming. It is also API independent. Light weight technology, no need of web or application servers. No byte code enhancement like EJB. Supports inheritance and polymorphism features. EJB component do not support inheritance. Pluggable with any Java/JEE or framework software based applications. The persistence logic of hibernate application can be access from all type of java client application. Gives implicit middleware services like jdbc connection pooling, transaction management etc.., Gives support to work with third party jdbc connection pooling. Support to call stored procedures and functions. Supports database indepen...