Dashboard > WebWork > ... > J2SE 5 Support > Key Annotation
  WebWork Log In View a printable version of the current page.  
  Key Annotation
Added by Rainer Hermanns, last edited by Kevin Shin on Mar 07, 2007  (view change)
Labels: 
(None)

Key Annotation

Sets the Key for type conversion.

Usage

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

Parameters

Parameter Required Default Description
value no java.lang.Object.class The key property value.

Examples

// The key property for User objects within the users collection is the <code>userName</code> attribute.
@Key( value = java.lang.Long.class )
private Map<Long, User> userMap;

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