hibernate1

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: