public static Object convert ( Object source , Attribute attr ) { try { return convert ( source , attr . getDataType ( ) ) ; } catch ( DataConversionException e ) { throw new AttributeValueConversionException ( format ( "Conversion failure in entity type [%s] attribute [%s]; %s" , attr . getEntity ( ) . getId ( ) , attr . getName ( ) , e . getMessage ( ) ) , e ) ; } }
Convert value to the type based on the given attribute .