Ans: Sorted Collection: The sorted collection is a collection that is sorted using the Java collections framework. The sorting is done in the memory of JVM that is running hibernate, soon after reading the data from the database using Java Comparator The less the collection the more the efficient of sorting
Ordered Collection: The order collections will also sorts a collection by using the order by clause for the results fetched.The more the collection, the more efficient of sorting
Ans: There are a lot to choose from, but I’d say my favorite thing is that Hibernate is that it’s an object-oriented query language.
There are a lot of potential answers to this question. The interviewer just wants to see where your values lie.
Ans: Entity beans are to be implemented by containers, classes, descriptors. Hibernate is just a tool that quickly persist the object tree to a class hierarchy in a database and without using a single SQL statement. The inheritance and polymorphism is quite simply implemented in hibernate which is out of the box of EJB and a big drawback.
Ans: It does a lot of things right, but I often find myself having to write boilerplate code while using Hibernate. The verbosity of the language makes my job more difficult.
Once again, the interviewer wants to see where your values lie.
Ans: Hibernate is an ORM tool for data persistency. Spring is a framework for enterprise applications. Spring supports hibernate and provides the different classes which are templates that contains the common code.
Ans: A Session object uses a first-level cache. You’d use a second-level cache if it was a SessionFactory object.
This is a skills question, which makes sure you’ve spent enough time with the program to know its ins and outs.
Ans: An entity bean always works under the EJB container, which allows reusing of the object external to the container. An object can not be detached in entity beans and in hibernate detached objects are supported.
Hibernate is not database dependent where as JDBC is database dependent. Query tuning is not needed for hibernate as JDBC is needed. Data can be placed in multiple cache which is supported by hibernate, whereas in JDBC the cache is to be implemented.
Ans: I take continuing education classes. I also try to read up on books and magazines. Then of course there are conferences — I try and go to at least one or two a year, since they can be so educational.
The interviewer wants to makes sure that you’re willing to maintain your expertise.
Ans: The advantages of Hibernate over JDBC are:
Ans: POJOs — which stand for Plain Old Java Objects — are more efficient than regular java classes.
This is a skills question, which makes sure you’ve spent enough time with the program to know its ins and outs.
Ans:
Ans: There’s Order Collection and Sorted Collection.
This is a skills question, which makes sure you’ve spent enough time with the program to know its ins and outs.
Ans: Hibernate Query Language is designed for data management using Hibernate technology. It is completely object oriented and hence has notions like inheritance, polymorphism and abstraction. The queries are case-sensitive. This has an exception for Java classes and properties. The query operations are through objects. HQL acts as a bridge between Objects and RDBMS.
Ans: Detached, Transient, and Persistent.
This is a skills question, which makes sure you’ve spent enough time with the program to know its ins and outs.
Ans: Advantages: