Class ByteArrayTranslatorFactory

java.lang.Object
com.googlecode.objectify.impl.translate.ValueTranslatorFactory<byte[],com.google.cloud.datastore.Blob>
com.googlecode.objectify.impl.translate.SimpleTranslatorFactory<byte[],com.google.cloud.datastore.Blob>
com.googlecode.objectify.impl.translate.ByteArrayTranslatorFactory
All Implemented Interfaces:
TranslatorFactory<byte[],com.google.cloud.datastore.Blob>

public class ByteArrayTranslatorFactory extends SimpleTranslatorFactory<byte[],com.google.cloud.datastore.Blob>

Translates a byte[] to Blob. Make sure this translator gets registered *before* the normal ArrayTranslator otherwise it won't get used.

Author:
Jeff Schnitzer invalid input: '<'[email protected]>
  • Constructor Details

    • ByteArrayTranslatorFactory

      protected ByteArrayTranslatorFactory()
  • Method Details

    • toPojo

      protected byte[] toPojo(com.google.cloud.datastore.Value<com.google.cloud.datastore.Blob> value)
      Specified by:
      toPojo in class SimpleTranslatorFactory<byte[],com.google.cloud.datastore.Blob>
    • toDatastore

      protected com.google.cloud.datastore.Value<com.google.cloud.datastore.Blob> toDatastore(byte[] value)
      Specified by:
      toDatastore in class SimpleTranslatorFactory<byte[],com.google.cloud.datastore.Blob>