LEONARDI Application Composer - 8.9.0.40 by W4 S.A.

leon.info.binding
Interface LyEncoderInterface


public interface LyEncoderInterface


Method Summary
 java.lang.Object decodeValue(LyFieldInfo fieldInfo, java.lang.Object value, java.lang.Class<?> valueClass)
          Builds a logical value for the given fieldInfo from a physical (peer) value.
 java.lang.Object encodeValue(LyFieldInfo fieldInfo, java.lang.Object value, java.lang.Class<?> objectClass)
          Returns an object of the given class from a value of the given fieldInfo.
 java.lang.Object[] encodeValues(LyFieldInfo fieldInfo, java.lang.Object value, java.lang.Class<?>[] objectClasses)
          Returns a table of objects for the given classes from a value of the given fieldInfo.
 

Method Detail

decodeValue

java.lang.Object decodeValue(LyFieldInfo fieldInfo,
                             java.lang.Object value,
                             java.lang.Class<?> valueClass)
Builds a logical value for the given fieldInfo from a physical (peer) value.

Parameters:
fieldInfo - Field info for which the peer value is decoded.
object - The peer value.
valueClass - Expected class of the logical value.
Returns:
The logical value that was built (instance of the valueClass).

encodeValue

java.lang.Object encodeValue(LyFieldInfo fieldInfo,
                             java.lang.Object value,
                             java.lang.Class<?> objectClass)
Returns an object of the given class from a value of the given fieldInfo. The purpose of this method is to support transformations from logical to physical representation.

Parameters:
fieldInfo - Field info for which the logical value is encoded.
value - Value of the fieldInfo. This value is an instance of the class returned by getValueClass method.
objectClass - Expected class of the physical value.

encodeValues

java.lang.Object[] encodeValues(LyFieldInfo fieldInfo,
                                java.lang.Object value,
                                java.lang.Class<?>[] objectClasses)
Returns a table of objects for the given classes from a value of the given fieldInfo. The purpose of this method is to support transformations from logical to physical representation when multiple bindings are used.

Parameters:
fieldInfo - Field info for which the logical values are encoded.
value - Value of this fieldInfo. This value is an instance of the class returned by getValueClass method.
objectClasses - Expected classes of the physical values.

(c) January 2013 - W4 S.A.

Website: W4 S.A., contact us: support@w4global.com