Sie sind auf Seite 1von 8

Part 1 of 1 Question 1 of 20

75.0/ 100.0 Points


5.0/ 5.0 Points

Which of the following are most common configuration methods of Hibernate Configuation?
A. persistence.xml

B. http.conf

C. hibernate.cfg.xml

Question 2 of 20

5.0/ 5.0 Points

Which of following is NOT a property in hibernate.cfg.xml file?


A. connection.username

B. connection.url

C. oracle_dialect

D. None of above

Question 3 of 20

5.0/ 5.0 Points

Once hibernate creates a table for an Object we cannot add a property to the class for saving
again
A. Always True

B. True if property size is small

C. Always False

D. None of above

Question 4 of 20

5.0/ 5.0 Points

A mapping file in hibernate for class Trainee is generally named as :


A. Trainee.cfg.xml

B. Trainee.xml

C. Trainee.hbm.xml

D. Trainee.hbm

Question 5 of 20

0.0/ 5.0 Points

What are the main advantages of ORM like hibernate?


A.Support for Query Language

B.Support multi databases

C.Mapping Java class to table

D.Steep learning curve

Question 6 of 20

What was Hibernate written in?


A. C

B. Java

5.0/ 5.0 Points

C. Assembly language

D. Ruby

Question 7 of 20

0.0/ 5.0 Points

How do you map Java Objects with Database table?


A. Anotation

B. XML mapping hbm.xml

C. Both

Question 8 of 20

5.0/ 5.0 Points

Java type String is mapped to following SQL type in hibernate :


A. VARCHAR

B. CHAR

C. VARBINARY

D. CLOB

Question 9 of 20

The <generator> tag is used for :


A. Generating table automatically

B. Generating column automatically

5.0/ 5.0 Points

C. Mapping property to column in table

D. Generating primary key values

Question 10 of 20

5.0/ 5.0 Points

Which of the following is NOT a step in the Hibernate communication with RDBMS?
A. Get one session from the session factory

B. Create session from configuration object

C. Load the Hibernate configuration file and create configuration object

D. Create HQL Query

E. Execute query to get list containing Java objects

Question 11 of 20

5.0/ 5.0 Points

Hibernate Query Language


A. Uses class name instead of table name, and property names instead of column name

B. Is JPA Query language

C. Is naming query language

D. Is native SQL

Question 12 of 20

What does hibernate.hbm2ddl.auto create this means?

0.0/ 5.0 Points

A. Create tables automatically

B. Create session object automatically

C. Create SessionFactory object automatically

D. None

Question 13 of 20

5.0/ 5.0 Points

What is true for session.get() method?


A. May return a lazily initiliazed proxy

B. None of the above

C. Will return null if there is no data in db or cache.

D. Will throw exception if there is no data in db or cache

Question 14 of 20

0.0/ 5.0 Points

Choose incorrect sentence


A. Transaction cannot rollback

B. Transaction should and either with a commit or a rollback

C. All communication with a database has to occur inside a transaction

D. Transaction is a set of database operations which must be executed in entirely or not at

all
Question 15 of 20

5.0/ 5.0 Points

Mapping Java classes to database tables is accomplished through the configuration file
A. Xhtml

B. Html

C. Xml

D. Properties

Question 16 of 20

5.0/ 5.0 Points

Load child object automatically when parent object is loaded?


A. lazy=no

B. lazy=true

C. lazy=yes

D. lazy=fasle

Question 17 of 20

Which annotation is used to achieve optimistic locking in hibernate?


A. @Version

B. @V

5.0/ 5.0 Points

C. @Release

D. @Lock

Question 18 of 20

5.0/ 5.0 Points

What is the root level element in a hibernate mapping file?


A. <hibernate-mapping>

B. <session-mapping>

C. <sessionfactory-mapping>

D. None of the above

Question 19 of 20

5.0/ 5.0 Points

Which of the following is not a Session method? Select ONE


A. Session.persist()

B. Session.remove()

C. Session.load()

D. Session.saveorupdate()

E. Session.save()

Question 20 of 20

When several entities points to the target entity, that is achieved by?

0.0/ 5.0 Points

A. @ManyToMany

B. @ManyToOne

C. @OneToOne

Das könnte Ihnen auch gefallen