All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.googlecode.objectify.ObjectifyService Maven / Gradle / Ivy

Go to download

*** THIS VERSION UPLOADED FOR USE WITH CEDAR-COMMON, TO AVOID DEPENDENCIES ON GOOGLE CODE-BASED MAVEN REPOSITORIES. *** The simplest convenient interface to the Google App Engine datastore

The newest version!
package com.googlecode.objectify;



/**
 * 

This is a simple container for a single static instance of ObjectifyFactory. * You can choose to use this class or build your own equivalent. You may prefer * to use a dependency injection system like Weld or Guice directly with an * ObjectifyFactory and eschew this class entirely.

* *

For further advice, see the * BestPractices.

* * @author Jeff Schnitzer */ public class ObjectifyService { /** Singleton instance */ protected static ObjectifyFactory factory = new ObjectifyFactory(); /** Call this to get the instance */ public static ObjectifyFactory factory() { return factory; } // // All static methods simply pass-through to the singleton factory // /** @see ObjectifyFactory#begin() */ public static Objectify begin() { return factory().begin(); } /** @see ObjectifyFactory#beginTransaction() */ public static Objectify beginTransaction() { return factory().beginTransaction(); } /** @see ObjectifyFactory#begin(ObjectifyOpts) */ public static Objectify begin(ObjectifyOpts opts) { return factory().begin(opts); } /** @see ObjectifyFactory#register(Class) */ public static void register(Class clazz) { factory().register(clazz); } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy