本文整理匯總了Java中com.googlecode.objectify.ObjectifyService.setFactory方法的典型用法代碼示例。如果您正苦於以下問題:Java ObjectifyService.setFactory方法的具體用法?Java ObjectifyService.setFactory怎麽用?Java ObjectifyService.setFactory使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類com.googlecode.objectify.ObjectifyService
的用法示例。
在下文中一共展示了ObjectifyService.setFactory方法的5個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: before
import com.googlecode.objectify.ObjectifyService; //導入方法依賴的package包/類
@Before
public void before() {
helper = new LocalServiceTestHelper(new LocalDatastoreServiceTestConfig()).setUp();
// Clear out the factory so that it requires re-registration on each test method.
// Otherwise, static registration of types in one method would persist across methods.
initOfy();
factory = ObjectifyService.factory();
ObjectifyService.setFactory(new ObjectifyFactory(false));
}
示例2: after
import com.googlecode.objectify.ObjectifyService; //導入方法依賴的package包/類
@After
public void after() {
ObjectifyFilter.complete();
ObjectifyService.setFactory(factory);
ObjectifyFilter.complete();
helper.tearDown();
}
示例3: setUpBeforeClass
import com.googlecode.objectify.ObjectifyService; //導入方法依賴的package包/類
@BeforeClass
public static void setUpBeforeClass() {
// Reset the Factory so that all translators work properly.
ObjectifyService.setFactory(new ObjectifyFactory());
ObjectifyService.register(Game.class);
// Mock out the firebase config
FirebaseChannel.firebaseConfigStream = new ByteArrayInputStream(
String.format("databaseURL: \"%s\"", FIREBASE_DB_URL).getBytes());
}
示例4: setUpBeforeClass
import com.googlecode.objectify.ObjectifyService; //導入方法依賴的package包/類
@BeforeClass
public static void setUpBeforeClass() {
// Reset the Factory so that all translators work properly.
ObjectifyService.setFactory(new ObjectifyFactory());
ObjectifyService.register(Game.class);
// Mock out the firebase config
FirebaseChannel.firebaseConfigStream =
new ByteArrayInputStream(String.format("databaseURL: \"%s\"", FIREBASE_DB_URL).getBytes());
}
示例5: after
import com.googlecode.objectify.ObjectifyService; //導入方法依賴的package包/類
@Override
protected void after() {
ObjectifyService.setFactory(original);
closable.close();
}