本文整理汇总了Java中com.google.api.client.extensions.appengine.datastore.AppEngineDataStoreFactory类的典型用法代码示例。如果您正苦于以下问题:Java AppEngineDataStoreFactory类的具体用法?Java AppEngineDataStoreFactory怎么用?Java AppEngineDataStoreFactory使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
AppEngineDataStoreFactory类属于com.google.api.client.extensions.appengine.datastore包,在下文中一共展示了AppEngineDataStoreFactory类的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: configure
import com.google.api.client.extensions.appengine.datastore.AppEngineDataStoreFactory; //导入依赖的package包/类
@Override
public void configure(Binder binder) {
// binder.bind(HttpTransport.class).toInstance(new UrlFetchTransport());
binder.bind(HttpTransport.class).toInstance(new NetHttpTransport());
/*
* TODO HH?
*/
binder.bind(DateFormat.class).toInstance(
new SimpleDateFormat("yyyy-MM-dd'T'hh:mm:ss.SSS'Z'"));
binder.bind(JsonFactory.class).toInstance(
JacksonFactory.getDefaultInstance());
/*
* Global instance of the {@link DataStoreFactory}. The best practice is
* to make it a single globally shared instance across your application.
*/
binder.bind(DataStoreFactory.class).toInstance(
AppEngineDataStoreFactory.getDefaultInstance());
binder.bind(AppEngineDataStoreFactory.class).in(Singleton.class);
}
示例2: initialise
import com.google.api.client.extensions.appengine.datastore.AppEngineDataStoreFactory; //导入依赖的package包/类
@Override
public void initialise(UpdatableInjectionContext injectionContext) {
super.initialise(injectionContext);
// for gmail API as the setup stores the creds established at setup time in DS
injectionContext.inject(AppEngineDataStoreFactory.getDefaultInstance()).as(DataStoreFactory.class);
injectionContext.inject(UrlFetchTransport.getDefaultInstance()).as(HttpTransport.class);
Class<? extends Mailer> mailerClass = Environment.is(Environment.DEV) ? LoggingMailer.class : GmailMailer.class;
injectionContext.inject(mailerClass).as(Mailer.class);
}
示例3: getDataStore
import com.google.api.client.extensions.appengine.datastore.AppEngineDataStoreFactory; //导入依赖的package包/类
public static DataStore<StoredCredential> getDataStore()
throws IOException
{
AppEngineDataStoreFactory factory = AppEngineDataStoreFactory.getDefaultInstance();
return StoredCredential.getDefaultDataStore( factory );
}
示例4: getDataStore
import com.google.api.client.extensions.appengine.datastore.AppEngineDataStoreFactory; //导入依赖的package包/类
public static DataStore<StoredCredential> getDataStore()
throws IOException
{
AppEngineDataStoreFactory factory = AppEngineDataStoreFactory.getDefaultInstance();
return StoredCredential.getDefaultDataStore( factory );
}