Class AppEngineEnvironment

  • All Implemented Interfaces:, java.lang.AutoCloseable

    public class AppEngineEnvironment
    extends java.lang.Object
    Sets up a fake ApiProxy.Environment so that the following operations can be performed without the Datastore service:
    • Create Objectify Keys.
    • Instantiate Objectify objects.
    • Convert Datastore Entities to their corresponding Objectify objects.

    User has the option to specify their desired appId string, which forms part of an Objectify Key and is included in the equality check. This feature makes it easy to compare a migrated object in SQL with the original in Objectify.

    Note that conversion from Objectify objects to Datastore Entities still requires the Datastore service.

    • Constructor Detail

      • AppEngineEnvironment

        public AppEngineEnvironment()
      • AppEngineEnvironment

        public AppEngineEnvironment​(java.lang.String appId)
    • Method Detail

      • close

        public void close()
        Specified by:
        close in interface java.lang.AutoCloseable
        Specified by:
        close in interface