本文整理了Java中org.hswebframework.ezorm.core.dsl.Update.excludes()
方法的一些代码示例,展示了Update.excludes()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Update.excludes()
方法的具体详情如下:
包路径:org.hswebframework.ezorm.core.dsl.Update
类名称:Update
方法名:excludes
暂无
代码示例来源: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
.excludes(excludeProperties.toArray(new String[excludeProperties.size()]))
.where(GenericEntity.id, userEntity.getId())
.exec();
代码示例来源:origin: hs-web/hsweb-framework
@Override
@Caching(put = {
@CachePut(key = "'ownerId:'+#result.ownerId"),
@CachePut(key = "'id:'+#result.id")
})
public OAuth2Client save(OAuth2Client oAuth2Client) {
OAuth2Client old = getClientById(oAuth2Client.getId());
if (old != null) {
DefaultDSLUpdateService
.createUpdate(oAuth2ClientDao, oAuth2Client)
.excludes("id", "createTime")
.where("id", oAuth2Client.getId()).exec();
} else {
oAuth2ClientDao.insert(((SimpleOAuth2ClientEntity) oAuth2Client));
}
return oAuth2Client;
}
代码示例来源:origin: hs-web/hsweb-easy-orm
public UpdateFromBean<T, Q, B> excludes(String... columns) {
proxy.excludes(columns);
return this;
}
代码示例来源:origin: hs-web/hsweb-easy-orm
@SafeVarargs
public final <B> Update<T, Q> excludes(MethodReferenceColumn<B>... columns) {
return excludes(Arrays.stream(columns).map(MethodReferenceColumn::getColumn).toArray(String[]::new));
}
代码示例来源:origin: hs-web/hsweb-easy-orm
@SafeVarargs
public final <B> Update<T, Q> excludes(StaticMethodReferenceColumn<B>... columns) {
return excludes(Arrays.stream(columns).map(StaticMethodReferenceColumn::getColumn).toArray(String[]::new));
}
代码示例来源: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
@Caching(put = {
@CachePut(key = "'ownerId:'+#result.ownerId"),
@CachePut(key = "'id:'+#result.id")
})
public OAuth2Client save(OAuth2Client oAuth2Client) {
OAuth2Client old = getClientById(oAuth2Client.getId());
if (old != null) {
DefaultDSLUpdateService
.createUpdate(oAuth2ClientDao, oAuth2Client)
.excludes("id", "createTime")
.where("id", oAuth2Client.getId()).exec();
} else {
oAuth2ClientDao.insert(((SimpleOAuth2ClientEntity) oAuth2Client));
}
return oAuth2Client;
}
内容来源于网络,如有侵权,请联系作者删除!