public interface AttributeConverter<T, TProvider>:
Converts one mapped Klyn value to and from a provider value.
Implementations are statically typed and must not rely on reflection during ordinary entity materialization or persistence.
@Converter(autoApply=true) public class EmailConverter implements AttributeConverter<Email, String>: public toProvider(value as Email) as String: return value.toString() public fromProvider(value as String) as Email: return Email(value)
| Modifier and Type | Member | Description |
|---|---|---|
| public | fromProviderfromProvider(value as TProvider) as T |
Converts a provider value to its entity property representation. |
| public | toProvidertoProvider(value as T) as TProvider |
Converts an entity property value to its provider representation. |