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

Popular posts from this blog

delphi - How to convert bitmaps to video? -

jasper reports - Fixed header in Excel using JasperReports -

python - ('The SQL contains 0 parameter markers, but 50 parameters were supplied', 'HY000') or TypeError: 'tuple' object is not callable -