Loading
? ] ]> Query q = sess.getNamedQuery("ByNameAndMaximumAge"); Criteria Queries : Criteria crit = session.createCriteria(Employee.class); crit.add( Restrictions.eq( "age", '35') ); crit.setMaxResults(10); List cats = crit.list(); "> Named Queries ? ] ]> Query q = sess.getNamedQuery("ByNameAndMaximumAge"); Criteria Queries : Criteria crit = session.createCriteria(Employee.class); crit.add( Restrictions.eq( "age", '35') ); crit.setMaxResults(10); List cats = crit.list(); ">

Java Quick Notes

Refresh Your Java - Before Java Interview

We are Agile, believe in less Documentation - Only Quick notes (Java Interview Questions) of Java/J2ee Read more....


Not Included Yet
Not Included Yet
Not Included Yet
Not Included Yet
Not Included Yet
Not Included Yet
Not Included Yet
Not Included Yet
Not Included Yet
Not Included Yet
Not Included Yet
Not Included Yet
Not Included Yet
Not Included Yet
Not Included Yet
Not Included Yet
Not Included Yet
Not Included Yet
Not Included Yet
Not Included Yet

Go to SiteMap

Q)  What are named queries ?


Ans)

<query name="ByNameAndMaximumWeight"><![CDATA[ from com.Employee as cat where cat.name = ? and cat.weight > ? ] ]></query>
 

Query q = sess.getNamedQuery("ByNameAndMaximumAge");
Criteria Queries :
Criteria crit = session.createCriteria(Employee.class);
crit.add( Restrictions.eq( "age", '35') );
crit.setMaxResults(10);
List cats = crit.list();
 



Back to top

------------------------- We hope you got necessary Info On -----------------------------------------

Named Queries


Named Queries

-------------------------------------------------------------------------------------------------------



Face Book
Request for a Mock Interview/Training

Get a PDF

Face Book
Same look (Read) on any device, this is Ads free