Documente Academic
Documente Profesional
Documente Cultură
A. Yes
B. None of the above
C. No
A. Trainee.cfg.xml
B. Trainee.xml
C. Trainee.hbm.xml
D. Trainee.hbm
A. SessionFactory
B. Transaction
C. Session
D. Configuration
After the persistent context is closed the entity goes in the following state
A. Removed
B. Persistent
C. Transient
D. Detached
A. Transaction is a set of database operations which must be executed in entirely or not at all
B. All communication with a database has to occur inside a transaction
C. Transaction cannot rollback
D. Transaction should and either with a commit or a rollback
A. org.hibernate.Transaction
B. org.hibernate.Session
C. org.hibernate.cfg.Configuration
D. org.hibernate.SessionFactory
A. Criteria
B. Transaction
C. Hibernate Query Language
D. hibernate.properties & programatic configuration
Hibernate Query Language
A. Uses class name instead of table name, and property names instead of column name
B. Is native SQL
C. Is JPA Query language
D. Is naming query language
A. SessionFactory.getSession();
B. SessionFactory.openSession();
C. SessionFactory.get();
D. SessionFactory.getObject();
How to begin a unit of work and return the associated Transaction object
A. Session.openTransaction()
B. SessionFactory.openTransaction()
C. SessionFactory.beginTransaction()
D. Session.beginTransaction()
A. @Id
B. @Key
C. @PrimaryKey
D. @Identifier
If the property of a class should not take part in persistence mechanism than the property should be marked as
A. @Lob
B. @Transient
C. @Temporary
D. @Enum
A. VARBINARY
B. CLOB
C. CHAR
D. VARCHAR
A. lazy=no
B. lazy=true
C. lazy=fasle
D. lazy=yes
Mapping Java classes to database tables is accomplished through the configuration file
A. Properties
B. Xml
C. Xhtml
D. Html
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
To obtain a SessionFactory with custom config file, we can use the following :
A. new Configuration("mycfg.cfg.xml").buildSessionFactory()
B. new Configuration().configure().buildSessionFactory()
C. new Configuration().configure("myfile.cfg.xml").buildSessionFactory()
D. new Configuration("mycfg.cfg").buildSessionFactory()
A. Delete object
B. Insert Object
C. Update object
D. Query that are built up using lots of conditional logic, avoid messy string manipulation
A. ResultSet
B. String
C. Object
D. HibernateResultSet
What happens when both hibernate.properties and hibernate.cfg.xml are in the classpath?
A. The settings of the properties file will override the settings used in the XML configuration
B. DuplicateConfigurationException
C. The settings of the XML configuration file will override the settings used in the properties
D. None
A. <hibernate-mapping>
B. <session-mapping>
C. <sessionfactory-mapping>
D. None of the above
What is true for session.get() method?
When several entities points to the target entity, that is achieved by?
A. @OneToOne
B. @ManyToOne
C. @ManyToMany
A. @Version
B. @Lock
C. @Release
D. @V
Which interface are not the core interfaces of Hibernate framework?
A. Configuration interface
B. Session interface
C. User Interface
D. Query and Criteria interfaces
E. SessionFactory interface
A. None of above
B. oracle_dialect
C. connection.username
D. connection.url
A. @Entity
B. @Column
C. @Table
D. None of the above
Which of the following are most common configuration methods of Hibernate Configuation?
A. http.conf
B. persistence.xml
C. hibernate.cfg.xml
A. <property>
B. <session-factory>
C. <hbm2ddl.auto>
D. <mapping>
A. Session.save()
B. Session.load()
C. Session.persist()
D. Session.saveorupdate()
E. Session.remove()
Which of the following is NOT a step in the Hibernate communication with RDBMS?
A. getParameters("name");
B. getParameterValues("name");
C. hibernate.connection.datasource
D. hibernate.connection.driver_class