net.sf.implessbean
Interface KeyMapper

All Known Implementing Classes:
CapitalStringKeyMapper, StringKeyMapper

public interface KeyMapper

KeyMapper is responsible to mapping a property name of the bean to a corresponding key of a Map containing values of the bean.

Since:
1.0
Version:
$Revision: 1.1 $
Author:
Kohji Nakamura

Method Summary
 java.lang.Object propertyNameToKey(java.util.Map values, java.lang.String propertyName)
          Returns a key object of Map corresponding to propertyName.
 

Method Detail

propertyNameToKey

public java.lang.Object propertyNameToKey(java.util.Map values,
                                          java.lang.String propertyName)
Returns a key object of Map corresponding to propertyName. Return null if there is no key object appropriate for propertyName. In this case, BeanHandler tries to invoke Map object's accessor method rather than to call its get/put method. If it doesn't have a corresponding accessor method, IllegalArgumentException would be thrown.

Parameters:
values - A Map object containing properties of the bean. You can use this Map to find out a key of Map corresponding to the propertyName. Don't change this Map.
propertyName - A name of property.
Returns:
A key object of Map corresponding to propertyName, or null.

Copyright (C) 2004 Kohji Nakamura. All rights reserved.