本文整理汇总了Java中com.google.datastore.v1.Mutation.Builder方法的典型用法代码示例。如果您正苦于以下问题:Java Mutation.Builder方法的具体用法?Java Mutation.Builder怎么用?Java Mutation.Builder使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.google.datastore.v1.Mutation
的用法示例。
在下文中一共展示了Mutation.Builder方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: apply
import com.google.datastore.v1.Mutation; //导入方法依赖的package包/类
@Override
public Mutation.Builder apply(Entity entity) {
return makeUpsert(entity);
}
示例2: makeInsert
import com.google.datastore.v1.Mutation; //导入方法依赖的package包/类
/**
* @param entity the entity to insert
* @return a mutation that will insert an entity
*/
public static Mutation.Builder makeInsert(Entity entity) {
return Mutation.newBuilder().setInsert(entity);
}
示例3: makeUpdate
import com.google.datastore.v1.Mutation; //导入方法依赖的package包/类
/**
* @param entity the entity to update
* @return a mutation that will update an entity
*/
public static Mutation.Builder makeUpdate(Entity entity) {
return Mutation.newBuilder().setUpdate(entity);
}
示例4: makeUpsert
import com.google.datastore.v1.Mutation; //导入方法依赖的package包/类
/**
* @param entity the entity to upsert
* @return a mutation that will upsert an entity
*/
public static Mutation.Builder makeUpsert(Entity entity) {
return Mutation.newBuilder().setUpsert(entity);
}
示例5: makeDelete
import com.google.datastore.v1.Mutation; //导入方法依赖的package包/类
/**
* @param key the key of the entity to delete
* @return a mutation that will delete an entity
*/
public static Mutation.Builder makeDelete(Key key) {
return Mutation.newBuilder().setDelete(key);
}