Hibernate ORM and JavaScript Quiz
Test your knowledge of Hibernate ORM framework features and JavaScript programming including events, objects, and dynamic content
Questions
window.location.href="www.google.com". The given statement when executed would result in one of the following:
- It will give an error
- It will execute and nothing will happen
- It will execute and www.google.com is going to open
- None of The above
onUnload event of Javascript is fired in which of the following conditions
- When browser is closed
- When the page reloads as well.
- Only when you navigate out of the page.
- All Of the Above
The following piece of javascript code is going to work fine. Trial Page
- True
- False
One can add custom method and properties to objects in javascript without using prototype as well.
- True
- False
parseJSON is a standard function available in javascript like alert, eval and others.
- True
- False
Please select right set of technologies that are required for implementing Dynamic Content or DHTML in your application
- HTML
- CSS
- Javascript
- Ajax
Does hibernate allow mixing table-per-class hierarchy and table-per-subclass strategies?
- Yes
- No
- Can't say
- None of the above
Which statement is correct ?
- session.contains() method to determine if an instance belongs to the session cache.
- session.contains() method to determine if an instance belongs to the data base
- Both are correct
- none of the above
What does session.evict() method do ?
- Remove the object and its collections from the first level cache
- Remove the object and its collections from the second level cache
- Remove the object and its collections from the data base
- None of the above
Is the Session threadsafe in Hibernate ?
- TRUE
- FALSE
- No matter
- None of the above
How can you make a property be read from the database but not modified in anyway
- By using the insert="false" and update="false" attributes
- By using the isinsert="false" and isupdate="false" attributes.
- By using the isinsert="no" and isupdate="no" attributes
- None
Which statement is correct ?
- A Session will not obtain a JDBC Connection (or a Datasource) unless it is needed
- A Session will obtain a JDBC Connection (or a Datasource) on object create
- A Session has no relation with JDBC Connection (or a Datasource)
- None of the above
How to enable query cache in hibernate
- Hibernate.cache.query_cache true
- Hibernate.cache.use_query_cache true
- Hibernate.cache.query_cache yes
- None
If you are not certain that a matching row exists in the database then which method is the best ?
- Session.load();
- Session.get();
- Session.fetch();
- None of the above
Which statement is correct?
- Bag has index column
- Bag permits duplicate element values
- Bag does not permits duplicate element values
- None
What does session.createQuery("Query").scroll() return ?
- ListResultSet
- ResultSet
- ScrollableResultSet
- ScrollableResult
How can the mapping files be configured in Hibernate?
- Mapping files can be added to Configuration in the application code
- They can be configured in hibernate.cfg.xml using the <mapping> elements
- Both a and b
- None of the above
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 ?
- Refresh();
- Flush();
- Fetch();
- Load()
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 ?
- Refresh();
- Flush();
- Fetch();
- Load()
Select the output of the following SQL statement : SELECT RPAD(name,10,'x') from client_table where name='TEST';
- xxxxxxTEST
- TESTxxxxxx
- ' TEST'
- 'TEST '