Dashboard > XWork > ... > Annotations > KeyProperty Annotation
  XWork Log In View a printable version of the current page.  
  KeyProperty Annotation
Added by Rainer Hermanns, last edited by Rainer Hermanns on Dec 01, 2006
Labels: 
(None)

Sets the KeyProperty for type conversion.

Usage

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.

Parameters

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

Examples

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

Site powered by a free Open Source Project / Non-profit License (more) of Confluence - the Enterprise wiki.
Learn more or evaluate Confluence for your organisation.
Powered by Atlassian Confluence, the Enterprise Wiki. (Version: 2.2.9 Build:#527 Sep 07, 2006) - Bug/feature request - Contact Administrators