Online Test

  • Facebook
  • Google
  • LinkedIn
  • Twitter
1 . Question :
          What is the root level element in the hibernate mapping file?
          
<hibernate>
<session-factory>
<hibernate-configuration>
None of the above

2 . Question :
          Which is true about <class> element?
          
The Java class name is specified using the name attribute of the class element.
The database table name is specified using the table attribute of the class element.
The <class> elements are used to define specific mappings from a Java classes to the database tables.
All of the above.

3 . Question :
          What does hibernate.show_sql true means in the config files
          
show sql results on the console.
show sql inputs on the console.
show sql statement on the console
None of the above

4 . Question :
          How will get a session object in hibernate?
          
SessionFactory.getSession();
SessionFactory.openSession();
SessionFactory.get();
SessionFactory.openObject();

5 . Question :
          How will you make property be read from database but not to modified in anyway in hibernate?
          
By using the insert="false" and update="false" attributes.
By using the isinsert="false" and isupdate="false" attributes.
By using the insert="no" and update="no" attributes.
None of the above

6 . Question :
          Which method is used to remove a persistent instance from the datastore?
          
Session.remove()
Session.delete()
Session.del()
Session.rm()

7 . Question :
          The POJOs is known for
          
Plane Old Java Objects
Particular Old Java Objects
Plain Open Java Objects
Plain Old Java Objects

8 . Question :
          Which is true about HQL?
          
HQL is database independent.
HQL is a Object Oriented Query language
HQL takes java objects in the same way as SQL takes tables.
All of the above.

9 . Question :
          Which is not a fetching strategy hibernate. ?
          
Sub-select Fetching
Select Fetching
Join Fetching
Dselect Fetching

10 . Question :
          Second Level Cache implementations are provided by different vendors such as?
          
EH Cache
Swarm Cache
OS Cache
All mentioned above

      Advertisements