本文整理了Java中org.hswebframework.ezorm.core.dsl.Query.in
方法的一些代码示例,展示了Query.in
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Query.in
方法的具体详情如下:
包路径:org.hswebframework.ezorm.core.dsl.Query
类名称:Query
方法名:in
暂无
代码示例来源:origin: hs-web/hsweb-framework
@Override
@Transactional(readOnly = true)
public List<E> selectByPk(List<PK> id) {
if (CollectionUtils.isEmpty(id)) {
return new ArrayList<>();
}
return createQuery().where().in(GenericEntity.id, id).listNoPaging();
}
代码示例来源:origin: hs-web/hsweb-framework
@Override
public List<UserEntity> selectByPk(List<String> id) {
if (CollectionUtils.isEmpty(id)) {
return new ArrayList<>();
}
return createQuery().where().in(UserEntity.id, id).listNoPaging();
}
代码示例来源:origin: hs-web/hsweb-framework
@Override
public List<AuthorizationSettingMenuEntity> selectBySettingId(List<String> settingId) {
if(CollectionUtils.isEmpty(settingId)){
return new ArrayList<>();
}
return createQuery().where().in(AuthorizationSettingMenuEntity.settingId, settingId).listNoPaging();
}
代码示例来源:origin: hs-web/hsweb-framework
@Override
@Cacheable(key = "'all-org-id:'+#personId.hashCode()")
public List<String> selectAllOrgId(List<String> personId) {
List<String> departmentId = this.selectAllDepartmentId(personId);
if (CollectionUtils.isEmpty(departmentId)) {
return new java.util.ArrayList<>();
}
return DefaultDSLQueryService.createQuery(departmentDao)
.where()
.in(DepartmentEntity.id, departmentId)
.listNoPaging()
.stream()
.map(DepartmentEntity::getOrgId)
.filter(Objects::nonNull)
.distinct()
.collect(Collectors.toList());
}
代码示例来源:origin: hs-web/hsweb-framework
@Override
@Cacheable(key = "'org-ids:'+#orgId==null?0:orgId.hashCode()+'_'+#children+'_'+#parent")
public List<DepartmentEntity> selectByOrgIds(List<String> orgId, boolean children, boolean parent) {
if (CollectionUtils.isEmpty(orgId)) {
return new java.util.ArrayList<>();
}
Set<String> allOrgId = new HashSet<>(orgId);
if (children) {
allOrgId.addAll(orgId.stream()
.map(organizationalService::selectAllChildNode)
.flatMap(Collection::stream)
.map(OrganizationalEntity::getId)
.collect(Collectors.toSet()));
}
if (parent) {
allOrgId.addAll(orgId.stream()
.map(organizationalService::selectParentNode)
.flatMap(Collection::stream)
.map(OrganizationalEntity::getId)
.collect(Collectors.toSet()));
}
return createQuery()
.where()
.in(DepartmentEntity.orgId, allOrgId)
.listNoPaging();
}
代码示例来源:origin: hs-web/hsweb-framework
@Override
public List<RoleEntity> getUserRole(String userId) {
Assert.hasLength(userId, "参数不能为空");
List<UserRoleEntity> roleEntities = userRoleDao.selectByUserId(userId);
if (roleEntities.isEmpty()) {
return new ArrayList<>();
}
List<String> roleIdList = roleEntities.stream().map(UserRoleEntity::getRoleId).collect(Collectors.toList());
return DefaultDSLQueryService
.createQuery(roleDao).where()
.in(GenericEntity.id, roleIdList)
.noPaging()
.list();
}
代码示例来源:origin: hs-web/hsweb-framework
private List<AuthorizationSettingEntity> getUserSetting(String userId) {
Map<String, List<SettingInfo>> settingInfo =
authorizationSettingTypeSuppliers.stream()
.map(supplier -> supplier.get(userId))
.flatMap(Set::stream)
.collect(Collectors.groupingBy(SettingInfo::getType));
Stream<Map.Entry<String, List<SettingInfo>>> settingInfoStream = settingInfo.entrySet().stream();
//大于1 使用并行处理
if (settingInfo.size() > 1) {
settingInfoStream = settingInfoStream.parallel();
}
return settingInfoStream
.map(entry ->
createQuery()
// where type = ? and setting_for in (?,?,?....)
.where(type, entry.getKey())
.and()
.in(settingFor, entry.getValue().stream().map(SettingInfo::getSettingFor).collect(Collectors.toList()))
.listNoPaging())
.flatMap(List::stream)
.collect(Collectors.toList());
}
代码示例来源:origin: hs-web/hsweb-framework
@Override
@Cacheable(key = "'all-department-id:'+#personId.hashCode()")
public List<String> selectAllDepartmentId(List<String> personId) {
if (CollectionUtils.isEmpty(personId)) {
return new java.util.ArrayList<>();
}
//所有的机构
List<String> positionId = DefaultDSLQueryService.createQuery(personPositionDao)
.where().in(PersonPositionEntity.personId, personId)
.listNoPaging()
.stream()
.map(PersonPositionEntity::getPositionId)
.filter(Objects::nonNull)
.distinct()
.collect(Collectors.toList());
if (CollectionUtils.isEmpty(positionId)) {
return new java.util.ArrayList<>();
}
return DefaultDSLQueryService.createQuery(positionDao)
.where()
.in(PositionEntity.id, positionId)
.listNoPaging()
.stream()
.map(PositionEntity::getDepartmentId)
.filter(Objects::nonNull)
.distinct()
.collect(Collectors.toList());
}
代码示例来源:origin: hs-web/hsweb-framework
@Override
@Caching(evict = {
@CacheEvict(value = "dyn-form-deploy", allEntries = true),
@CacheEvict(value = "dyn-form", allEntries = true),
})
@Transactional(propagation = Propagation.NOT_SUPPORTED)
public void deployAllFromLog() {
List<String> tags = new ArrayList<>(Arrays.asList(this.tags));
if (loadOnlyTags != null) {
tags.addAll(Arrays.asList(loadOnlyTags));
}
List<DynamicFormEntity> entities = createQuery()
.select(DynamicFormEntity.id)
.where(DynamicFormEntity.deployed, true)
.and()
.in(DynamicFormEntity.tags, tags)
.listNoPaging();
if (logger.isDebugEnabled()) {
logger.debug("do deploy all form , size:{}", entities.size());
}
for (DynamicFormEntity form : entities) {
DynamicFormDeployLogEntity logEntity = dynamicFormDeployLogService.selectLastDeployed(form.getId());
if (null != logEntity) {
deployFromLog(logEntity);
}
}
}
代码示例来源:origin: hs-web/hsweb-framework
@Override
@CacheEvict(allEntries = true)
public List<DynamicFormColumnEntity> deleteColumn(List<String> ids) {
Objects.requireNonNull(ids);
if (ids.isEmpty()) {
return new java.util.ArrayList<>();
}
List<DynamicFormColumnEntity> oldColumns = DefaultDSLQueryService
.createQuery(formColumnDao)
.where()
.in(DynamicFormColumnEntity.id, ids)
.listNoPaging();
DefaultDSLDeleteService.createDelete(formColumnDao)
.where().in(DynamicFormDeployLogEntity.id, ids)
.exec();
return oldColumns;
}
代码示例来源:origin: hs-web/hsweb-framework
.in(TreeSupportEntity.id, rootIds)
.listNoPaging();
代码示例来源:origin: hs-web/hsweb-framework
.createQuery(authorizationSettingDetailDao)
.where(status, STATE_OK)
.and().in(settingId, settingIdList)
.listNoPaging();
代码示例来源:origin: org.hswebframework.web/hsweb-commons-service-simple
@Override
@Transactional(readOnly = true)
public List<E> selectByPk(List<PK> id) {
if (CollectionUtils.isEmpty(id)) {
return new ArrayList<>();
}
return createQuery().where().in(GenericEntity.id, id).listNoPaging();
}
代码示例来源:origin: org.hswebframework.web/hsweb-system-dynamic-form-local
@Override
@Caching(evict = {
@CacheEvict(value = "dyn-form-deploy", allEntries = true),
@CacheEvict(value = "dyn-form", allEntries = true),
})
@Transactional(propagation = Propagation.NOT_SUPPORTED)
public void deployAllFromLog() {
List<String> tags = new ArrayList<>(Arrays.asList(this.tags));
if (loadOnlyTags != null) {
tags.addAll(Arrays.asList(loadOnlyTags));
}
List<DynamicFormEntity> entities = createQuery()
.select(DynamicFormEntity.id)
.where(DynamicFormEntity.deployed, true)
.and()
.in(DynamicFormEntity.tags, tags)
.listNoPaging();
if (logger.isDebugEnabled()) {
logger.debug("do deploy all form , size:{}", entities.size());
}
for (DynamicFormEntity form : entities) {
DynamicFormDeployLogEntity logEntity = dynamicFormDeployLogService.selectLastDeployed(form.getId());
if (null != logEntity) {
deployFromLog(logEntity);
}
}
}
代码示例来源:origin: org.hswebframework.web/hsweb-system-dynamic-form-local
@Override
@CacheEvict(allEntries = true)
public List<DynamicFormColumnEntity> deleteColumn(List<String> ids) {
Objects.requireNonNull(ids);
if (ids.isEmpty()) {
return new java.util.ArrayList<>();
}
List<DynamicFormColumnEntity> oldColumns = DefaultDSLQueryService
.createQuery(formColumnDao)
.where()
.in(DynamicFormColumnEntity.id, ids)
.listNoPaging();
DefaultDSLDeleteService.createDelete(formColumnDao)
.where().in(DynamicFormDeployLogEntity.id, ids)
.exec();
return oldColumns;
}
内容来源于网络,如有侵权,请联系作者删除!