contains() and isConnected methods in Hibernate

contains(Object object): Used to check whether the instance is associated with the session or not.

Example on contains(object)

Output:

isConnected(): Used to check whether session is currently connected or not.

Example on isConnected()

Output:

 

Posted in hibernate and tagged , , , .

Leave a Reply

Your email address will not be published. Required fields are marked *