|1600 PMP mock questions||1400 CAPM mock questions||800 SCJP 6 mock questions||600 OCAJP 7 mock questions||590 OCPJP 7 mock questions||556 SCWCD 5 mock questions||500 OCEJWCD 6 mock questions||pdfDownload (java,struts, hibernet etc)|
Hibernate interview questions
!!! Hibernate interview questions !!!
Q.What are the general considerations or best practices for defining your Hibernate persistent classes?
1.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.
2.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.
3. It is recommended to implement the Serializable interface. This is potentially useful if you want to migrate around a multi-processor cluster.
4.The persistent class should not be final because if it is final then lazy loading cannot be used by creating proxy objects.
Reviews and Comments
PMP, CAPM, PMI is a registered certification mark of the Project Management Institute, Inc
Copyright © www.techfaq360.com 2016