java - How to get values from pojo list -


i storing values of below query list having type pojo class. need each videos vlist.and wants how can retrive in loop. dao.java

@suppresswarnings("unchecked") @override public list<videos> getfullvideolist(long albumid) {     // todo auto-generated method stub     // albumid=11;     session=sessionfactory.opensession();     tx=session.begintransaction();     query query = session.createquery( "from videos  videostatus=1");     query.setparameter("albumid", albumid).setparameter("videotype","vdsg");;     list<videos> vlist=query.list(); tx.commit();     session.close();     return vlist; } 

simply iterate using loop

if size of list large, don't use .list() method. may outofmemory error.

instead use statelesssession , scrollable resultset. more fast , efficient.


Comments

Popular posts from this blog

toolbar - How to add link to user registration inside toobar in admin joomla 3 custom component -

linux - disk space limitation when creating war file -

How to provide Authorization & Authentication using Asp.net, C#? -