what are advantages of HQL?
what are advantages of Native SQL?
what are advantages of Criteria API?



what are advantages of HQL? what are advantages of Native SQL? what are advantages of Criteria API..

Answer / ravi verma

find a persisted user by user id which was primary key in
that case. What if we want to search a user by user name,age
or email and none of these attributes is a primary key.
Hibernate provides a query language similar to the standard
SQL to perform operations on the Hibernate objects. The
advantage of using HQL instead of standard SQL is that SQL
varies as different databases are adopted to implement
different solutions,but HQL remain the same as long as you
are within the domain of Hibernate; no matter which database
you are using

Is This Answer Correct ?    5 Yes 2 No

Post New Answer

More Java J2EE AllOther Interview Questions

Is it possible to create Userdefined Unchecked Exception also?If Yes, give an example?

1 Answers   HCL,


what is the difference between banking and insurance domain?

2 Answers  


How to call the m1() method of Base class in below snippet ? class Base { public void m1() { System.out.println("Base m1 "); } public void m2() { System.out.println("Base m1 "); } } ====================== class Derived extends Base { public void m1() { System.out.println("Derived m1"); } public void m3() { System.out.println("Derived m3"); } public static void main(String[] args) { Base ob=new Derived(); ob.m1(); //System.out.println("Hello World!"+ob.m1()); } }

6 Answers   Cap Gemini, TCS,


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

2 Answers   IBM,


what protocols does JNDI provide an interface to?

1 Answers  






How do you debug your java program?

2 Answers   HCL, Inforica,


waht are architecture of web application?

2 Answers  


what debugging tool that can be used to debug the java programs?

1 Answers   Inforica,


Write a postfix expression to (a*(b+c/d)*d-e)

4 Answers   Adobe,


Difference between Spring framework and Struts framework?

12 Answers   IBM, L&T, VAM,


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

3 Answers   Infosys, Wipro,


What is Generic in java? Where can we write Generic ( class or method or objects or etc...)? with simple example? Thanks, Bose. Infosys 2 In which way does a Primitive data type is passed ? Sun- Microsystems 4 what is the use of declaring constructor as private? Sai- Softech 5 what is difference between global methods and local methods? 1 What is meant by class loader and how many types are there? Apple 1 what is meaning of JIT? 4 What is an abstract class? Wipro 5 what is filters and its use? Virtusa 2 why is multiple inheritance not allowed in java? Elementus-Technologies 7 Differences between jdk 1.4 and 1.5 Wipro 4 is JVM platform dependent or independent..? IBM 6 what is main purpose of abstract class? 5 what is difference between colection and collections? Tech-Mahindra 11 What error occurs if a try-catch-finally statement sequence does not have a catch clause? 2 Explain the difference between scrollbar and scrollpane? 1 Explain the differences between public, private, protected and static? 4 Explain the difference between getAppletInfo and getParameterInfo? 1 Is Cegonsoft Pvt.Ltd. a good Institute? 4 Why only one Class is public in one file? Explain in details. Thanks in Advance. 11 Which method will get invoked first in a stand alone application?

0 Answers  


Categories