本文整理了Java中com.google.cloud.datastore.KeyValue.newBuilder()
方法的一些代码示例,展示了KeyValue.newBuilder()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。KeyValue.newBuilder()
方法的具体详情如下:
包路径:com.google.cloud.datastore.KeyValue
类名称:KeyValue
方法名:newBuilder
暂无
代码示例来源:origin: googleapis/google-cloud-java
@Override
public Builder newBuilder(Key key) {
return KeyValue.newBuilder(key);
}
代码示例来源:origin: googleapis/google-cloud-java
public KeyValue(Key key) {
this(newBuilder(key));
}
代码示例来源:origin: googleapis/google-cloud-java
@SuppressWarnings("deprecation")
@Test
public void testBuilder() throws Exception {
KeyValue.Builder builder = KeyValue.newBuilder(CONTENT);
KeyValue value = builder.setMeaning(1).setExcludeFromIndexes(true).build();
assertEquals(CONTENT, value.get());
assertEquals(1, value.getMeaning());
assertTrue(value.excludeFromIndexes());
}
}
代码示例来源:origin: com.google.cloud/google-cloud-datastore
@Override
public Builder newBuilder(Key key) {
return KeyValue.newBuilder(key);
}
代码示例来源:origin: com.google.cloud/google-cloud-datastore
public KeyValue(Key key) {
this(newBuilder(key));
}
代码示例来源:origin: sai-pullabhotla/catatumbo
@Override
public ValueBuilder<?, ?, ?> toDatastore(Object input) {
if (input == null) {
return NullValue.newBuilder();
}
DatastoreKey datastoreKey = (DatastoreKey) input;
return KeyValue.newBuilder(datastoreKey.nativeKey());
}
代码示例来源:origin: sai-pullabhotla/catatumbo
builder = StringValue.newBuilder((String) input);
} else if (input instanceof DatastoreKey) {
builder = KeyValue.newBuilder(((DatastoreKey) input).nativeKey());
} else if (input instanceof GeoLocation) {
GeoLocation geoLocation = (GeoLocation) input;
内容来源于网络,如有侵权,请联系作者删除!