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...