com.google.cloud.datastore.KeyValue.newBuilder()方法的使用及代码示例

x33g5p2x  于2022-01-24 转载在 其他  
字(1.6k)|赞(0)|评价(0)|浏览(90)

本文整理了Java中com.google.cloud.datastore.KeyValue.newBuilder()方法的一些代码示例,展示了KeyValue.newBuilder()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。KeyValue.newBuilder()方法的具体详情如下:
包路径:com.google.cloud.datastore.KeyValue
类名称:KeyValue
方法名:newBuilder

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;

相关文章

微信公众号

最新文章

更多