In hibernate when does Query fire and return ResultSet -
can u please tell in hibernate when query fire , return resultset. tell below example
session session =sessionfactory.opensession(); criteria criteria = session.createcriteria(client.class); criteria.add(restrictions.like("clientname","%"+search+"%")); criteria.setmaxresults(10); list list = criteria.list();
the query fired when encounters criteria.list()
in code when using criteria , returns list
of objects of class specified in session.createcriteria('')
. here client
in case.
you can find more options @ criteria documentation
Comments
Post a Comment