Java BulkUpdate类代码示例

本文整理汇总了Java中com.holonplatform.core.datastore.bulk.BulkUpdate的典型用法代码示例。如果您正苦于以下问题:Java BulkUpdate类的具体用法?Java BulkUpdate怎么用?Java BulkUpdate使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


Java BulkUpdate类代码示例

BulkUpdate类属于com.holonplatform.core.datastore.bulk包,在下文中一共展示了BulkUpdate类的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: testBulk

import com.holonplatform.core.datastore.bulk.BulkUpdate; //导入依赖的package包/类
@Test
@Transactional
@Rollback
public void testBulk() {
	BulkUpdate upd = getDatastore().bulkUpdate(TARGET);
	upd.set(ENM, TestEnum.THIRD);
	upd.setNull(DAT);
	upd.filter(KEY.loe(1L));

	upd.withExpressionResolver(KeyIs.RESOLVER);

	OperationResult result = upd.execute();

	assertEquals(1, result.getAffectedCount());

	upd = getDatastore().bulkUpdate(TARGET);
	upd.set(ENM, TestEnum.THIRD);
	upd.filter(KEY.eq(1L));
	result = upd.execute();

	assertEquals(1, result.getAffectedCount());

	BulkDelete del = getDatastore().bulkDelete(TARGET).filter(KEY.goe(10L));
	del.withExpressionResolver(KeyIs.RESOLVER);
	result = del.execute();

	assertEquals(0, result.getAffectedCount());

	getDatastore().save(TARGET, PropertyBox.builder(KEY, STR).set(KEY, 99L).set(STR, "Test dml").build());

	del = getDatastore().bulkDelete(TARGET).filter(KEY.gt(98L));
	result = del.execute();

	assertEquals(1, result.getAffectedCount());

} 
开发者ID:holon-platform,项目名称:holon-datastore-jpa-querydsl,代码行数:37,代码来源:AbstractQueryDslTest.java

示例2: testBulk

import com.holonplatform.core.datastore.bulk.BulkUpdate; //导入依赖的package包/类
@Test
@Transactional
@Rollback
public void testBulk() {
	BulkUpdate upd = getDatastore().bulkUpdate(ENTITY_TARGET);
	upd.set(ENM, TestEnum.THIRD);
	upd.filter(KEY.loe(1L));

	upd.withExpressionResolver(KeyIs.RESOLVER);

	OperationResult result = upd.execute();

	assertEquals(1, result.getAffectedCount());

	upd = getDatastore().bulkUpdate(ENTITY_TARGET);
	upd.set(ENM, TestEnum.THIRD);
	upd.filter(KEY.eq(1L));
	result = upd.execute();

	assertEquals(1, result.getAffectedCount());

	BulkDelete del = getDatastore().bulkDelete(ENTITY_TARGET).filter(KEY.goe(10L));
	del.withExpressionResolver(KeyIs.RESOLVER);
	result = del.execute();

	assertEquals(0, result.getAffectedCount());

	getDatastore().save(ENTITY_TARGET, PropertyBox.builder(KEY, STR).set(KEY, 99L).set(STR, "Test bulk").build());

	del = getDatastore().bulkDelete(NAMED_TARGET).filter(KEY.gt(98L));
	result = del.execute();

	assertEquals(1, result.getAffectedCount());

} 
开发者ID:holon-platform,项目名称:holon-datastore-jpa,代码行数:36,代码来源:AbstractJpaDatastoreTest.java

示例3: set

import com.holonplatform.core.datastore.bulk.BulkUpdate; //导入依赖的package包/类
@Override
public <T> BulkUpdate set(Path<T> path, T value) {
	ObjectUtils.argumentNotNull(path, "Path must be not null");
	values.put(path, value);
	return this;
} 
开发者ID:holon-platform,项目名称:holon-datastore-jpa,代码行数:7,代码来源:JpaBulkUpdate.java

示例4: setNull

import com.holonplatform.core.datastore.bulk.BulkUpdate; //导入依赖的package包/类
@Override
public BulkUpdate setNull(@SuppressWarnings("rawtypes") Path path) {
	ObjectUtils.argumentNotNull(path, "Path must be not null");
	values.put(path, null);
	return this;
} 
开发者ID:holon-platform,项目名称:holon-datastore-jpa,代码行数:7,代码来源:JpaBulkUpdate.java

示例5: withExpressionResolver

import com.holonplatform.core.datastore.bulk.BulkUpdate; //导入依赖的package包/类
@Override
public <E extends Expression, R extends Expression> BulkUpdate withExpressionResolver(
		ExpressionResolver<E, R> expressionResolver) {
	expressionResolverRegistry.addExpressionResolver(expressionResolver);
	return this;
} 
开发者ID:holon-platform,项目名称:holon-datastore-jpa,代码行数:7,代码来源:JpaBulkUpdate.java

示例6: bulkUpdate

import com.holonplatform.core.datastore.bulk.BulkUpdate; //导入依赖的package包/类
@Override
public BulkUpdate bulkUpdate(DataTarget<?> target, WriteOption... options) {
	return new JpaBulkUpdate(this, target, options);
} 
开发者ID:holon-platform,项目名称:holon-datastore-jpa,代码行数:5,代码来源:DefaultJpaDatastore.java

示例7: bulkUpdate

import com.holonplatform.core.datastore.bulk.BulkUpdate; //导入依赖的package包/类
@Override
public BulkUpdate bulkUpdate(DataTarget<?> target, WriteOption... options) {
	ObjectUtils.argumentNotNull(target, "Data target must be not null");
	return new JdbcBulkUpdate(this, target, getDialect(), isTraceEnabled());
} 
开发者ID:holon-platform,项目名称:holon-datastore-jdbc,代码行数:6,代码来源:DefaultJdbcDatastore.java

示例8: setNull

import com.holonplatform.core.datastore.bulk.BulkUpdate; //导入依赖的package包/类
@Override
public BulkUpdate setNull(Path path) {
	ObjectUtils.argumentNotNull(path, "Path must be not null");
	values.put(path, null);
	return this;
} 
开发者ID:holon-platform,项目名称:holon-datastore-jdbc,代码行数:7,代码来源:JdbcBulkUpdate.java

示例9: bulkUpdate

import com.holonplatform.core.datastore.bulk.BulkUpdate; //导入依赖的package包/类
/**
 * Create a {@link BulkUpdate} clause for bulk UPDATE operations.
 * @param target {@link DataTarget} to identify data entity to update
 * @param options Optional write options. The write options are specific for each concrete Datastore implementation.
 * @return {@link BulkUpdate} clause
 */
BulkUpdate bulkUpdate(DataTarget<?> target, WriteOption... options); 
开发者ID:holon-platform,项目名称:holon-core,代码行数:8,代码来源:Datastore.java

本文标签属性:

示例:示例是什么意思

代码:代码转换器

java:java游戏

上一篇:PHP RSSFeed::showListForCentral方法代码示例
下一篇:十五年的青梅(关于十五年的青梅的介绍)

为您推荐