There are three types of Hibernate object states.
An object is in transient state if it is just created and not associated with session.
Employee e1=new Employee();
An object is in persistent state if session is opened and you saved the instance of the object or get the object from the database.
An object is in detached state if session is closed. After detached state object come to Persistent state.