当前位置: 首页>>代码示例>>Java>>正文


Java SQLUpdateClause.where方法代码示例

本文整理汇总了Java中com.mysema.query.sql.dml.SQLUpdateClause.where方法的典型用法代码示例。如果您正苦于以下问题:Java SQLUpdateClause.where方法的具体用法?Java SQLUpdateClause.where怎么用?Java SQLUpdateClause.where使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在com.mysema.query.sql.dml.SQLUpdateClause的用法示例。


在下文中一共展示了SQLUpdateClause.where方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: updateInitiative

import com.mysema.query.sql.dml.SQLUpdateClause; //导入方法依赖的package包/类
@Override
@Transactional(readOnly=false)
public void updateInitiative(InitiativeManagement initiative, Long userId, boolean basic, boolean extra) {
    Assert.notNull(initiative, "initiative");
    Assert.notNull(userId, "userId");

    Long initiativeId = initiative.getId();
    Assert.notNull(initiativeId, "initiative.id");

    SQLUpdateClause update = queryFactory.update(qInitiative);
    populateInitiative(update, initiative, userId, basic, extra);
    update.where(qInitiative.id.eq(initiative.getId()));
    
    if (update.execute() != 1) {
        throw new NotFoundException(qInitiative.getTableName(), initiative.getId());
    } 
}
 
开发者ID:solita,项目名称:kansalaisaloite,代码行数:18,代码来源:InitiativeDaoImpl.java

示例2: loginRegisteredUser

import com.mysema.query.sql.dml.SQLUpdateClause; //导入方法依赖的package包/类
@Override
@Transactional(readOnly=false)
public User loginRegisteredUser(String ssnHash) {
    User user = getRegisteredUser(ssnHash);
    if (user != null) {
        SQLUpdateClause update = queryFactory.update(qUser);
        update.set(qUser.lastlogin, new DateTime());
        update.where(qUser.id.eq(user.getId()));
        update.execute();
    }
    return user;
}
 
开发者ID:solita,项目名称:kansalaisaloite,代码行数:13,代码来源:UserDaoImpl.java

示例3: setUserRoles

import com.mysema.query.sql.dml.SQLUpdateClause; //导入方法依赖的package包/类
@Override
public void setUserRoles(Long userId, boolean vrk, boolean om) {
    Assert.notNull(userId, "userId");
    SQLUpdateClause update = queryFactory.update(qUser);
    update.set(qUser.vrk, vrk);
    update.set(qUser.om, om);
    update.where(qUser.id.eq(userId));
    update.execute();
}
 
开发者ID:solita,项目名称:kansalaisaloite,代码行数:10,代码来源:UserDaoImpl.java

示例4: changePassword

import com.mysema.query.sql.dml.SQLUpdateClause; //导入方法依赖的package包/类
@Transactional
@Override
public boolean changePassword(String loginId, String password) {
	SQLUpdateClause update = queryFactory.update(u);
	update.set(u.password, password);
	update.set(u.lockVersion, u.lockVersion.add(1));
	update.set(u.updatedAt, DateTimeExpression.currentTimestamp(LocalDateTime.class));
	update.where(u.loginId.eq(loginId), u.deletedFlg.eq(DeletedFlag.NOT_DELETED.code()));
	return update.execute() == 1L;
}
 
开发者ID:agwlvssainokuni,项目名称:springapp,代码行数:11,代码来源:PasswdServiceImpl.java

示例5: saveAndUnlock

import com.mysema.query.sql.dml.SQLUpdateClause; //导入方法依赖的package包/类
@Override
public void saveAndUnlock(final String numberName, final long current) {
	SQLUpdateClause update = queryFactory.update(nm);
	update.set(nm.currentValue, current);
	update.set(nm.lockVersion, nm.lockVersion.add(1));
	update.where(nm.name.eq(numberName));
	long count = update.execute();
	checkState(count == 1, "Failed to update %s: name=%s, currentValue=%s, count=%s", nm.getTableName(),
			numberName, current, count);
}
 
开发者ID:agwlvssainokuni,项目名称:springapp,代码行数:11,代码来源:NumberingStoreImpl.java

示例6: finishMessage

import com.mysema.query.sql.dml.SQLUpdateClause; //导入方法依赖的package包/类
@Override
public void finishMessage(long messageId) {

	SQLUpdateClause update = queryFactory.update(ml);
	update.set(ml.mailStatus, FlagCode.TRUE.code());
	update.set(ml.sentAt, bizDateTime.now());
	update.set(ml.lockVersion, ml.lockVersion.add(1));
	update.where(ml.id.eq(messageId));
	long count = update.execute();
	checkState(count == 1L, "failed to update %s: id=%s, mailStatus=%s", ml.getTableName(), messageId,
			FlagCode.TRUE.code());

	long c = queryFactory.delete(mq).where(mq.mailId.eq(messageId)).execute();
	checkState(c == 1L, "failed to delete %s: mailId=%s", mq.getTableName(), messageId);
}
 
开发者ID:agwlvssainokuni,项目名称:springapp,代码行数:16,代码来源:MessageStoreImpl.java

示例7: updateToLaunched

import com.mysema.query.sql.dml.SQLUpdateClause; //导入方法依赖的package包/类
@Transactional("jtaTransactionManager")
public void updateToLaunched(long asyncId, LocalDateTime dtm) {
	SQLUpdateClause update = queryFactory.update(ap);
	update.set(ap.asyncStatus, AsyncStatus.LAUNCHED.code());
	update.set(ap.launchedAt, dtm);
	update.set(ap.updatedAt, currentTimestamp(LocalDateTime.class));
	update.set(ap.lockVersion, ap.lockVersion.add(1));
	update.where(ap.id.eq(asyncId));
	long count = update.execute();
	checkState(count == 1L, "failed to update %s: id=%s, asyncStatus=%s, launchedAt=%s, count=%s",
			ap.getTableName(), asyncId, AsyncStatus.LAUNCHED.code(), dtm, count);
}
 
开发者ID:agwlvssainokuni,项目名称:springapp,代码行数:13,代码来源:AsyncProcessStoreImpl.java

示例8: updateToProcessing

import com.mysema.query.sql.dml.SQLUpdateClause; //导入方法依赖的package包/类
@Transactional(propagation = REQUIRES_NEW)
@Override
public void updateToProcessing(long asyncId, LocalDateTime dtm) {
	SQLUpdateClause update = queryFactory.update(ap);
	update.set(ap.asyncStatus, AsyncStatus.PROCESSING.code());
	update.set(ap.startedAt, dtm);
	update.set(ap.updatedAt, currentTimestamp(LocalDateTime.class));
	update.set(ap.lockVersion, ap.lockVersion.add(1));
	update.where(ap.id.eq(asyncId));
	long count = update.execute();
	checkState(count == 1L, "failed to update %s: id=%s, asyncStatus=%s, startedAt=%s, count=%s",
			ap.getTableName(), asyncId, AsyncStatus.PROCESSING.code(), dtm, count);
}
 
开发者ID:agwlvssainokuni,项目名称:springapp,代码行数:14,代码来源:AsyncProcessStoreImpl.java

示例9: finishAsyncProcess

import com.mysema.query.sql.dml.SQLUpdateClause; //导入方法依赖的package包/类
private void finishAsyncProcess(long asyncId, LocalDateTime dtm, AsyncStatus status) {
	SQLUpdateClause update = queryFactory.update(ap);
	update.set(ap.asyncStatus, status.code());
	update.set(ap.finishedAt, dtm);
	update.set(ap.updatedAt, currentTimestamp(LocalDateTime.class));
	update.set(ap.lockVersion, ap.lockVersion.add(1));
	update.where(ap.id.eq(asyncId));
	long count = update.execute();
	checkState(count == 1L, "failed to update %s: id=%s, asyncStatus=%s, finishedAt=%s, count=%s",
			ap.getTableName(), asyncId, status.code(), dtm, count);
}
 
开发者ID:agwlvssainokuni,项目名称:springapp,代码行数:12,代码来源:AsyncProcessStoreImpl.java

示例10: saveAndUnlock

import com.mysema.query.sql.dml.SQLUpdateClause; //导入方法依赖的package包/类
@Override
public void saveAndUnlock(final String numberName, final long current) {
	SQLUpdateClause update = queryFactory.update(nm);
	update.set(nm.currentValue, current);
	update.set(nm.lockVersion, nm.lockVersion.add(1));
	update.where(nm.name.eq(numberName), nm.deletedFlg.eq(DeletedFlag.NOT_DELETED.code()));
	long count = update.execute();
	checkState(count == 1, "Failed to update %s: name=%s, currentValue=%s, count=%s", nm.getTableName(),
			numberName, current, count);
}
 
开发者ID:agwlvssainokuni,项目名称:springapp,代码行数:11,代码来源:NumberingStoreImpl.java

示例11: finishMessage

import com.mysema.query.sql.dml.SQLUpdateClause; //导入方法依赖的package包/类
@Override
public void finishMessage(long messageId) {

	SQLUpdateClause update = queryFactory.update(ml);
	update.set(ml.mailStatus, FlagCode.TRUE.code());
	update.set(ml.sentAt, bizDateTime.now());
	update.set(ml.lockVersion, ml.lockVersion.add(1));
	update.where(ml.id.eq(messageId), ml.deletedFlg.eq(DeletedFlag.NOT_DELETED.code()));
	long count = update.execute();
	checkState(count == 1L, "failed to update QMailLog: id=%s, mailStatus=%s", messageId, FlagCode.TRUE.code());

	long c = queryFactory.delete(mq)
			.where(mq.mailId.eq(messageId), mq.deletedFlg.eq(DeletedFlag.NOT_DELETED.code())).execute();
	checkState(c == 1L, "failed to delete QMailQueue: mailId=%s", messageId);
}
 
开发者ID:agwlvssainokuni,项目名称:springapp,代码行数:16,代码来源:MessageStoreImpl.java

示例12: updateToLaunched

import com.mysema.query.sql.dml.SQLUpdateClause; //导入方法依赖的package包/类
@Transactional("jtaTransactionManager")
public void updateToLaunched(long asyncId, LocalDateTime dtm) {
	SQLUpdateClause update = queryFactory.update(ap);
	update.set(ap.asyncStatus, AsyncStatus.LAUNCHED.code());
	update.set(ap.launchedAt, dtm);
	update.set(ap.updatedAt, currentTimestamp(LocalDateTime.class));
	update.set(ap.lockVersion, ap.lockVersion.add(1));
	update.where(ap.id.eq(asyncId));
	update.where(ap.deletedFlg.eq(DeletedFlag.NOT_DELETED.code()));
	long count = update.execute();
	checkState(count == 1L, "failed to update QAsyncProcess: id=%s, asyncStatus=%s, launchedAt=%s, count=%s",
			asyncId, AsyncStatus.LAUNCHED.code(), dtm, count);
}
 
开发者ID:agwlvssainokuni,项目名称:springapp,代码行数:14,代码来源:AsyncProcessStoreImpl.java

示例13: updateToProcessing

import com.mysema.query.sql.dml.SQLUpdateClause; //导入方法依赖的package包/类
@Transactional(propagation = REQUIRES_NEW)
@Override
public void updateToProcessing(long asyncId, LocalDateTime dtm) {
	SQLUpdateClause update = queryFactory.update(ap);
	update.set(ap.asyncStatus, AsyncStatus.PROCESSING.code());
	update.set(ap.startedAt, dtm);
	update.set(ap.updatedAt, currentTimestamp(LocalDateTime.class));
	update.set(ap.lockVersion, ap.lockVersion.add(1));
	update.where(ap.id.eq(asyncId));
	update.where(ap.deletedFlg.eq(DeletedFlag.NOT_DELETED.code()));
	long count = update.execute();
	checkState(count == 1L, "failed to update QAsyncProcess: id=%s, asyncStatus=%s, startedAt=%s, count=%s",
			asyncId, AsyncStatus.PROCESSING.code(), dtm, count);
}
 
开发者ID:agwlvssainokuni,项目名称:springapp,代码行数:15,代码来源:AsyncProcessStoreImpl.java

示例14: finishAsyncProcess

import com.mysema.query.sql.dml.SQLUpdateClause; //导入方法依赖的package包/类
private void finishAsyncProcess(long asyncId, LocalDateTime dtm, AsyncStatus status) {
	SQLUpdateClause update = queryFactory.update(ap);
	update.set(ap.asyncStatus, status.code());
	update.set(ap.finishedAt, dtm);
	update.set(ap.updatedAt, currentTimestamp(LocalDateTime.class));
	update.set(ap.lockVersion, ap.lockVersion.add(1));
	update.where(ap.id.eq(asyncId));
	update.where(ap.deletedFlg.eq(DeletedFlag.NOT_DELETED.code()));
	long count = update.execute();
	checkState(count == 1L, "failed to update QAsyncProcess: id=%s, asyncStatus=%s, finishedAt=%s, count=%s",
			asyncId, status.code(), dtm, count);
}
 
开发者ID:agwlvssainokuni,项目名称:springapp,代码行数:13,代码来源:AsyncProcessStoreImpl.java

示例15: executePerformUpdate

import com.mysema.query.sql.dml.SQLUpdateClause; //导入方法依赖的package包/类
private Object executePerformUpdate(PerformUpdate query) {
	SQLUpdateClause update = update(query.getEntity());
	
	update.set(query.getColumns(), query.getValues());
	
	QueryMetadata metadata = query.getMetadata();
	if(metadata != null) {
		update.where(metadata.getWhere());
	}
	
	return update.execute();		
}
 
开发者ID:IDgis,项目名称:geo-publisher,代码行数:13,代码来源:PublisherTransaction.java


注:本文中的com.mysema.query.sql.dml.SQLUpdateClause.where方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。