Answer Posted / 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 |
Post New Answer View All Answers
What are the different types of collections views being provided by the map interface? : java collections
What are the classes in the java collection framework? : java collections
What is the enumerator of the java collection framework? : java collections
Hi Friends , am newbie to ajax. For example just consider one account registration - A form contains 8 text fields with submit button. In this form second texbox contains "username " . On right side of text box there is a label box . On clilck action i need to determine user is available or not. Is it possible on clicking label or should i click submit button.
Hi frnds how to lock an user when he enter wrong credentials more than 3 time using java or j2ee tech take username and password in a bean no need to connect DB and validate give me some sample application code or links its urgent for me thanks in advance
What are the types of java collections? : java collections
who will give req's to u?. how they send req's to u? . what design documents contains?. when bugs raised on other developer code how to report to them?.(throgh mail or ........). how to retrive 100 recods from dao layer to presentation layer.using which collection?. what is sequence diagram.?.
What are the uses of the set interfaces in the java collections? : java collections
Should we create system software ( e.g operating system ) in java ?
Explain the OOPS concept in Realtime Scenarion ? Take example as CAR. Please explain indetail ?
What are the different types of classes implemented in the set interfaces? : java collections
please mail me the interview question based on java/j2ee
Hi Friends, i have searched in google but not clear. can you give bank example with synchronized keyword
my interviewer asked me what technical specification you used how to answer that question
What are the interfaces in java collections? : java collections