const mixinafBedSheet::ValueEncoders
afBedSheet::ValueEncoders
(Service) - Contribute your ValueEncoder
classes to this.
@Contribute { serviceType=ValueEncoders# } static Void contributeValueEncoders(MappedConfig conf) { conf[MyEntity#] = conf.autobuild(MyEntityEncoder#) }
@uses a MappedConfig of Type:ValueEncoder
where Type
is what the ValueEncoder
, um, encodes!
- toClient
abstract Str? toClient(Type valType, Obj? value)
Converts the given
value
to Str via a contributed ValueEncoder. If noValueEncoder
is found,toStr()
is used.- toValue
abstract Obj? toValue(Type valType, Str? clientValue)
Converts the given
clientValue
into the givenvalType
via a contributed ValueEncoder. If noValueEncoder
is found the value is coerced.