const classafBedSheet::ValueEncoderSource
sys::Obj afBedSheet::ValueEncoderSource
Holds a collection of ValueEncoders.
@Contribute { serviceType=ValueEncoderSource# }
static Void contributeValueEncoders(MappedConfig config) {
config.addMapped(MyEntity#, config.autobuild(MyEntityEncoder#))
}
@uses a MappedConfig of Type to ValueEncoders
- make
new make(Type:ValueEncoder valueEncoders)- toClient
Str toClient(Type valType, Obj value)Converts the given
valueto Str via a contributed ValueEncoder. If noValueEncoderis found,toStr()is used.- toValue
Obj toValue(Type valType, Str clientValue)Converts the given
clientValueinto the givenvalTypevia a contributed ValueEncoder. If noValueEncoderis found, this looks for a suitable static factoryfromStr()method on the type.