You need to implement hashCode
and equals
methods in your StudentMaster
and StudentMasterVO
classes so that they will be properly compared for equality.
If you are using Eclipse (or any other IDE), then it can generate those methods for you, just choose which fields are to be taken into account when comparing.
See for example this article if you are not familiar with the concept: http://www.javaworld.com/community/node/1006