| java.lang.Object org.iscreen.mvel.MvelObjectMapping
MvelObjectMapping | public class MvelObjectMapping (Code) | | This class handles the mapping of data from one object to another.
It uses the MVEL API to perform the actual mapping.
author: Shellman, Dan |
Constructor Summary | |
public | MvelObjectMapping(String getter, String setter) Default constructor taking the 'getter' MVEL expression and the
'setter' MVEL expression. |
Method Summary | |
public boolean | equals(Object obj) Equality is based upon the 'setter' MVEL expression (not the 'getter'
expression). | public String | getGetter() Retrieves the 'getter' MVEL expression that this mapper is configured
to use. | public String | getSetter() Retrieves the 'setter' MVEL expression that this mapper is configured
to use. | public int | hashCode() The hash code is based upon the 'setter' MVEL expression. | public void | map(Object fromBean, Object toBean) Maps a property from the fromBean to the toBean using the configured
OGNL getter/setter expressions. |
MvelObjectMapping | public MvelObjectMapping(String getter, String setter)(Code) | | Default constructor taking the 'getter' MVEL expression and the
'setter' MVEL expression. This is a fail-fast call, so if the
getter or setter MVEL expressions are "invalid," then an
unchecked exception (ConfigurationException) will be thrown.
Parameters: getter - The 'getter' OGNL expression. Parameters: setter - The 'setter' OGNL expression. |
equals | public boolean equals(Object obj)(Code) | | Equality is based upon the 'setter' MVEL expression (not the 'getter'
expression).
Parameters: obj - The mapper to compare to Returns true only if the 'setter' MVEL expressions are identical(meaning the Strings are equal). |
getGetter | public String getGetter()(Code) | | Retrieves the 'getter' MVEL expression that this mapper is configured
to use.
Returns the 'getter' MVEL expression. |
getSetter | public String getSetter()(Code) | | Retrieves the 'setter' MVEL expression that this mapper is configured
to use.
Returns the 'setter' MVEL expression. |
hashCode | public int hashCode()(Code) | | The hash code is based upon the 'setter' MVEL expression.
Returns the hash code for this mapper. |
map | public void map(Object fromBean, Object toBean)(Code) | | Maps a property from the fromBean to the toBean using the configured
OGNL getter/setter expressions. If the objects can't accept the
OGNL expressions, an unchecked ConfigurationException is thrown.
Parameters: fromBean - The object to copy the property from (the source). Parameters: toBean - The object to copy the property to (the destination). |
|
|