public class ByteArrayTranslatorFactory extends ValueTranslatorFactory<byte[],Object>
Translates a byte[] to Blob. Make sure this translator gets registered *before* the normal ArrayTranslator otherwise it won't get used.
Also reads ShortBlob into the byte[]
Modifier | Constructor and Description |
---|---|
protected |
ByteArrayTranslatorFactory() |
Modifier and Type | Method and Description |
---|---|
protected ValueTranslator<byte[],Object> |
createValueTranslator(TypeKey<byte[]> tk,
CreateContext ctx,
Path path)
Create a translator, knowing that we have the appropriate type.
|
create
protected ValueTranslator<byte[],Object> createValueTranslator(TypeKey<byte[]> tk, CreateContext ctx, Path path)
ValueTranslatorFactory
createValueTranslator
in class ValueTranslatorFactory<byte[],Object>
tk
- type is guaranteed to erase to something assignable to ClassCopyright © 2016. All rights reserved.