Pages

Friday, October 30, 2009

Hibernate Interceptors

Consider that we have requirement where we need to trim the values of the strings in the model Object that we are going to save . but if we write a method like trim() which we will call the method by passing a object as an argument which returns the trimmed() values.but consider , i have defined all the variables in my model classes as private , so we cannot access them in our super class even and cannot change the values [trimming...
Read More

Hibernate Annotation - @Embedded and @Embeddable

In this blog, I will explain you how to map a component using @Embedded and @Embeddable Annotations.Consider the Student Object which contains columns , StudentID StudentNameStudentClassStudentStreetStudentCityStudentStateWe can see the columns StudentStreet , city and state can be kept in one more object “Address”.where as the Student Object contains only StudentID,StudentName and StudentClass.So now we can make these fields...
Read More