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

Source

new make(Type:ValueEncoder valueEncoders)

toClient

Source

Str toClient(Type valType, Obj value)

Converts the given value to Str via a contributed ValueEncoder. If no ValueEncoder is found, toStr() is used.

toValue

Source

Obj toValue(Type valType, Str clientValue)

Converts the given clientValue into the given valType via a contributed ValueEncoder. If no ValueEncoder is found, this looks for a suitable static factory fromStr() method on the type.