if( Property.class.isAssignableFrom( memberClass ) )
{
Property property = (Property) qi4jField;
OgnlContext ognlContext = (OgnlContext) aContext;
Class<?> propertyType = (Class) api.propertyDescriptorFor( property ).type();
Object convertedValue = getConvertedType(
ognlContext, aTarget, null, fieldName, aPropertyValue, propertyType );
try
{
property.set( convertedValue );
}
catch( ConstraintViolationException e )
{
Collection<ConstraintViolation> violations = e.constraintViolations();
handleConstraintViolation( aContext, aTarget, fieldName, convertedValue, violations );
}
return;
}
else if( Association.class.isAssignableFrom( memberClass ) )
{
Association association = (Association) qi4jField;
OgnlContext ognlContext = (OgnlContext) aContext;
Class<?> associationType = (Class) api.associationDescriptorFor( association ).type();
Object convertedValue = getConvertedType(
ognlContext, aTarget, null, fieldName, aPropertyValue, associationType );
if( convertedValue == OgnlRuntime.NoConversionPossible )
{