Fork me on GitHub
Edit on GitHub << back to Annotations

KeyProperty Annotation

Sets the KeyProperty for type conversion.


The KeyProperty annotation must be applied at field or method level.

This annotation should be used with Generic types, if the key property of the key element needs to be specified.


Parameter Required Default Description
value no id The key property value.


 // The key property for User objects within the users collection is the <code>userName</code> attribute.
 @KeyProperty( value = "userName" )
 protected List<User> users = null;