Home
Login
Management Consulting
Take Test
Sign Up!
Corporate Accounts
How It Works
Support
Email:
Password:
Forgot your password?
  Hibernate Test Questions
Below is a sample question from a Hibernate test:
Which of the following is a best practice for defining your Hibernate persistent classes?
The persistent class should be final because if it is final then lazy loading can be used by creating proxy objects.
It is recommended to implement the Serializable interface. This is potentially useful if you want to migrate around a multi-processor cluster.
You should implement the equals() and hashCode() methods based on your business key and it is important not to use the id field in your equals() and hashCode() definition if the id field is a surrogate key (i.e. Hibernate managed identifier). This is because the Hibernate only generates and sets the field when saving the object.
You must have a default no-argument constructor for your persistent classes and there should be getXXX() (i.e. accessor/getter) and setXXX (i.e. mutator/setter) methods for all your persistable instance variables.
Back to Hibernate Testing Browse all IT Skills
 ©2008 TechCheck, LLC. All rights reserved. Use of TechCheck® constitutes acceptance of the Terms of Service and Privacy Policy.