本文整理了Java中org.hswebframework.ezorm.core.dsl.Update.and()
方法的一些代码示例,展示了Update.and()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Update.and()
方法的具体详情如下:
包路径:org.hswebframework.ezorm.core.dsl.Update
类名称:Update
方法名:and
暂无
代码示例来源:origin: hs-web/hsweb-framework
@Override
public void cancelDeployed(String formId, long version) {
Objects.requireNonNull(formId);
createUpdate()
.set(DynamicFormDeployLogEntity.status, DataStatus.STATUS_DISABLED)
.where(DynamicFormDeployLogEntity.formId, formId)
.and(DynamicFormDeployLogEntity.version, version)
.exec();
}
}
代码示例来源:origin: hs-web/hsweb-framework
@Override
public int updateByPk(PK pk, E entity) {
Assert.notNull(pk, "primary key can not be null");
Assert.hasText(String.valueOf(pk), "primary key can not be null");
Assert.notNull(entity, "entity can not be null");
entity.setId(pk);
tryValidate(entity, UpdateGroup.class);
return createUpdate(entity)
//如果是RecordCreationEntity则不修改creator_id和creator_time
.when(entity instanceof RecordCreationEntity,
update -> update.and().excludes(((RecordCreationEntity) entity).getCreatorIdProperty(), RecordCreationEntity.createTime))
.where(GenericEntity.id, pk)
.exec();
}
代码示例来源:origin: hs-web/hsweb-framework
@Override
@Transactional(propagation = Propagation.NOT_SUPPORTED)
@Caching(put = {
@CachePut(cacheNames = "oauth2-access-token", key = "'refresh:'+#result.refreshToken"),
@CachePut(cacheNames = "oauth2-access-token", key = "'token:'+#result.accessToken"),
@CachePut(cacheNames = "oauth2-access-token", key = "'cgo'+#result.clientId+#result.grantType+#result.ownerId")
})
public OAuth2AccessToken saveOrUpdateToken(OAuth2AccessToken token) {
Assert.notNull(token, "token can not be null!");
int total = DefaultDSLQueryService
.createQuery(oAuth2AccessDao)
.where("clientId", token.getClientId())
.and("grantType", token.getGrantType())
.and("ownerId", token.getOwnerId()).total();
token.setUpdateTime(System.currentTimeMillis());
if (total > 0) {
DefaultDSLUpdateService
.createUpdate(oAuth2AccessDao, token)
.where("clientId", token.getClientId())
.and("grantType", token.getGrantType())
.and("ownerId", token.getOwnerId())
.exec();
} else {
token.setCreateTime(System.currentTimeMillis());
oAuth2AccessDao.insert(((OAuth2AccessEntity) token));
}
return token;
}
}
代码示例来源:origin: hs-web/hsweb-easy-orm
@Override
public UpdateFromBean<T, Q, B> and() {
proxy.and();
return this;
}
代码示例来源:origin: hs-web/hsweb-easy-orm
public Update<T, Q> where(String column, String termType, Object value) {
and(column, termType, value);
return this;
}
代码示例来源:origin: hs-web/hsweb-easy-orm
public UpdateFromBean<T, Q, B> and(String column, String termType, Object value) {
proxy.and(column, termType, value);
return this;
}
代码示例来源:origin: org.hswebframework.web/hsweb-system-dynamic-form-local
@Override
public void cancelDeployed(String formId, long version) {
Objects.requireNonNull(formId);
createUpdate()
.set(DynamicFormDeployLogEntity.status, DataStatus.STATUS_DISABLED)
.where(DynamicFormDeployLogEntity.formId, formId)
.and(DynamicFormDeployLogEntity.version, version)
.exec();
}
}
代码示例来源:origin: org.hswebframework.web/hsweb-commons-service-simple
@Override
public int updateByPk(PK pk, E entity) {
Assert.notNull(pk, "primary key can not be null");
Assert.hasText(String.valueOf(pk), "primary key can not be null");
Assert.notNull(entity, "entity can not be null");
entity.setId(pk);
tryValidate(entity, UpdateGroup.class);
return createUpdate(entity)
//如果是RecordCreationEntity则不修改creator_id和creator_time
.when(entity instanceof RecordCreationEntity,
update -> update.and().excludes(((RecordCreationEntity) entity).getCreatorIdProperty(), RecordCreationEntity.createTime))
.where(GenericEntity.id, pk)
.exec();
}
代码示例来源:origin: org.hswebframework.web/hsweb-system-oauth2-server-local
@Override
@Transactional(propagation = Propagation.NOT_SUPPORTED)
@Caching(put = {
@CachePut(cacheNames = "oauth2-access-token", key = "'refresh:'+#result.refreshToken"),
@CachePut(cacheNames = "oauth2-access-token", key = "'token:'+#result.accessToken"),
@CachePut(cacheNames = "oauth2-access-token", key = "'cgo'+#result.clientId+#result.grantType+#result.ownerId")
})
public OAuth2AccessToken saveOrUpdateToken(OAuth2AccessToken token) {
Assert.notNull(token, "token can not be null!");
int total = DefaultDSLQueryService
.createQuery(oAuth2AccessDao)
.where("clientId", token.getClientId())
.and("grantType", token.getGrantType())
.and("ownerId", token.getOwnerId()).total();
token.setUpdateTime(System.currentTimeMillis());
if (total > 0) {
DefaultDSLUpdateService
.createUpdate(oAuth2AccessDao, token)
.where("clientId", token.getClientId())
.and("grantType", token.getGrantType())
.and("ownerId", token.getOwnerId())
.exec();
} else {
token.setCreateTime(System.currentTimeMillis());
oAuth2AccessDao.insert(((OAuth2AccessEntity) token));
}
return token;
}
}
内容来源于网络,如有侵权,请联系作者删除!