what is hibernate ceteria ?

Answers were Sorted based on User's Feedback



what is hibernate ceteria ?..

Answer / kameshwar

The interface org.hibernate.Criteria represents a query
against a particular persistent class. The Session is a
factory for Criteria instances.

Criteria crit = sess.createCriteria(Cat.class);
crit.setMaxResults(50);
List cats = crit.list();

Is This Answer Correct ?    5 Yes 1 No

what is hibernate ceteria ?..

Answer / sushant

Hibernate is a replacement of DAO layer used in traditional
JDBC based applications.

And similarly you can say that Criteria is a replacement for
query to the DB.

Used somewhat like...

Session session = sessionFactory.openSession();
Criteria demoCriteria = session.createCriteria(Animal.class);

....
later you can set some property or restrictions in the query...

demoCriteria.add( Restrictions.like("name", "Dog%") )..
...etc.
..
and then execute this criteria to get the results.

List resultsList = demoCriteria.list();

hope that helps.
Mail me for some more info if you require some.
-Sushant

Is This Answer Correct ?    3 Yes 0 No

what is hibernate ceteria ?..

Answer / lal ajith kumara

Criteria technology used to search operations in hibernate.

Is This Answer Correct ?    0 Yes 0 No

what is hibernate ceteria ?..

Answer / guest

asdf

Is This Answer Correct ?    0 Yes 14 No

Post New Answer

More Java J2EE AllOther Interview Questions

i need java 1+ experience resume on java developer kindly send me my mail id:srikanthreddy1.marla@gmail.com

1 Answers  


"Sun Certified Java Programmer" This is one String , we need to print SCJP, write the java code dynamically? pls reply this questions

6 Answers   Photon,


How many controlers are there in spring? Plz send me ans

1 Answers   HCL,


Am chittibabu from vadavalli, My father name is nanjan.he is working in state bank of india at vadavalli, My mother name is ramal. She is house wife. My brother name is rajaram he is working in Privete Company. I was born on 25-january-1984 at bhavanisager in Erode District. I have completed my school in government higher secondary school bhavanisager. After that I came to coimbatore for higher study.i have joined Bsc computer science in sri ramalinga sowdambigai college of science and commerce, affiliated by bharathiyar university, coimbatore. In the same college, I have continued UG degree also. but I got a job in Systech infovation as a software programmer,so I discontinued Msc Degree.I have one and half years experience from this concern. Here I have completed two products; one is Tranport management solution for balaji goods carriers at tirupur. Another one is Embroidery Management Solution for Angel Embroidery at tirupur. After that I got an another job in metis technologies as senior software engineer. I have one year experience from this company.here I working in school management product.it is developing version by version.

3 Answers  


What is need of DAO? Write one simple DAO example?

2 Answers   IBM,






Runining mutiple tomcat server in a single machine is possible Yuo wil have to duplicate configuration with different port numbers

2 Answers   HCL,


What are the different types of collections views being provided by the map interface? : java collections

0 Answers  


what about web architecture?

1 Answers   HCL,


What are the types of java collections? : java collections

0 Answers  


Can any one tell me How to explain bank project desription in interview

3 Answers   Infosys, Wipro,


What is difference between Application Server and Web Server?

1 Answers   Logica CMG, SCS,


what is diff string and stringbuffer

7 Answers   CTS, HCL,


Categories