Hibernate ORM and JavaScript Quiz

Test your knowledge of Hibernate ORM framework features and JavaScript programming including events, objects, and dynamic content

20 Questions Published

Questions

Question 1 Multiple Choice (Single Answer)

window.location.href="www.google.com". The given statement when executed would result in one of the following:

  1. It will give an error
  2. It will execute and nothing will happen
  3. It will execute and www.google.com is going to open
  4. None of The above
Question 2 Multiple Choice (Single Answer)

onUnload event of Javascript is fired in which of the following conditions

  1. When browser is closed
  2. When the page reloads as well.
  3. Only when you navigate out of the page.
  4. All Of the Above
Question 3 True/False

The following piece of javascript code is going to work fine. Trial Page

  1. True
  2. False
Question 4 True/False

One can add custom method and properties to objects in javascript without using prototype as well.

  1. True
  2. False
Question 5 True/False

parseJSON is a standard function available in javascript like alert, eval and others.

  1. True
  2. False
Question 6 Multiple Choice (Multiple Answers)

Please select right set of technologies that are required for implementing Dynamic Content or DHTML in your application

  1. HTML
  2. CSS
  3. Javascript
  4. Ajax
Question 7 Multiple Choice (Single Answer)

Does hibernate allow mixing table-per-class hierarchy and table-per-subclass strategies?

  1. Yes
  2. No
  3. Can't say
  4. None of the above
Question 8 Multiple Choice (Single Answer)

Which statement is correct ?

  1. session.contains() method to determine if an instance belongs to the session cache.
  2. session.contains() method to determine if an instance belongs to the data base
  3. Both are correct
  4. none of the above
Question 9 Multiple Choice (Single Answer)

What does session.evict() method do ?

  1. Remove the object and its collections from the first level cache
  2. Remove the object and its collections from the second level cache
  3. Remove the object and its collections from the data base
  4. None of the above
Question 10 Multiple Choice (Single Answer)

Is the Session threadsafe in Hibernate ?

  1. TRUE
  2. FALSE
  3. No matter
  4. None of the above
Question 11 Multiple Choice (Single Answer)

How can you make a property be read from the database but not modified in anyway

  1. By using the insert="false" and update="false" attributes
  2. By using the isinsert="false" and isupdate="false" attributes.
  3. By using the isinsert="no" and isupdate="no" attributes
  4. None
Question 12 Multiple Choice (Single Answer)

Which statement is correct ?

  1. A Session will not obtain a JDBC Connection (or a Datasource) unless it is needed
  2. A Session will obtain a JDBC Connection (or a Datasource) on object create
  3. A Session has no relation with JDBC Connection (or a Datasource)
  4. None of the above
Question 13 Multiple Choice (Single Answer)

How to enable query cache in hibernate

  1. Hibernate.cache.query_cache true
  2. Hibernate.cache.use_query_cache true
  3. Hibernate.cache.query_cache yes
  4. None
Question 14 Multiple Choice (Single Answer)

If you are not certain that a matching row exists in the database then which method is the best ?

  1. Session.load();
  2. Session.get();
  3. Session.fetch();
  4. None of the above
Question 15 Multiple Choice (Single Answer)

Which statement is correct?

  1. Bag has index column
  2. Bag permits duplicate element values
  3. Bag does not permits duplicate element values
  4. None
Question 16 Multiple Choice (Single Answer)

What does session.createQuery("Query").scroll() return ?

  1. ListResultSet
  2. ResultSet
  3. ScrollableResultSet
  4. ScrollableResult
Question 17 Multiple Choice (Single Answer)

How can the mapping files be configured in Hibernate?

  1. Mapping files can be added to Configuration in the application code
  2. They can be configured in hibernate.cfg.xml using the <mapping> elements
  3. Both a and b
  4. None of the above
Question 18 Multiple Choice (Single Answer)

It is possible to re-load an object and all its collections at any time, using the xxxx() method. This is useful when database triggers are used to initialize some of the properties of the object.What is the xxxx() method ?

  1. Refresh();
  2. Flush();
  3. Fetch();
  4. Load()
Question 19 Multiple Choice (Single Answer)

It is possible to re-load an object and all its collections at any time, using the xxxx() method. This is useful when database triggers are used to initialize some of the properties of the object.What is the xxxx() method ?

  1. Refresh();
  2. Flush();
  3. Fetch();
  4. Load()
Question 20 Multiple Choice (Single Answer)

Select the output of the following SQL statement : SELECT RPAD(name,10,'x') from client_table where name='TEST';

  1. xxxxxxTEST
  2. TESTxxxxxx
  3. ' TEST'
  4. 'TEST '