Class KeyTranslatorFactory

  • All Implemented Interfaces:
    TranslatorFactory<Key<?>,​com.google.cloud.datastore.Key>

    public class KeyTranslatorFactory
    extends SimpleTranslatorFactory<Key<?>,​com.google.cloud.datastore.Key>
    Knows how to convert Key objects to datastore-native Key objects and vice-versa.
    Author:
    Jeff Schnitzer
    • Constructor Detail

      • KeyTranslatorFactory

        public KeyTranslatorFactory()
    • Method Detail

      • toPojo

        protected Key<?> toPojo​(com.google.cloud.datastore.Value<com.google.cloud.datastore.Key> value)
        Specified by:
        toPojo in class SimpleTranslatorFactory<Key<?>,​com.google.cloud.datastore.Key>
      • toDatastore

        protected com.google.cloud.datastore.Value<com.google.cloud.datastore.Key> toDatastore​(Key<?> value)
        Specified by:
        toDatastore in class SimpleTranslatorFactory<Key<?>,​com.google.cloud.datastore.Key>