change to isblank like filters check

This commit is contained in:
Efstratios Giannopoulos 2024-06-20 14:27:48 +03:00
parent f0c160327d
commit c890b8ec39
16 changed files with 16 additions and 16 deletions

View File

@ -203,7 +203,7 @@ public class ActionConfirmationQuery extends QueryBase<ActionConfirmationEntity>
@Override
protected <X, Y> Predicate applyFilters(QueryContext<X, Y> queryContext) {
List<Predicate> predicates = new ArrayList<>();
if (this.like != null && !this.like.isEmpty()) {
if (this.like != null && !this.like.isBlank()) {
predicates.add(this.queryUtilsService.ilike(queryContext.CriteriaBuilder, queryContext.Root.get(ActionConfirmationEntity._token), this.like));
}
if (this.ids != null) {

View File

@ -272,7 +272,7 @@ public class DescriptionQuery extends QueryBase<DescriptionEntity> {
@Override
protected <X, Y> Predicate applyFilters(QueryContext<X, Y> queryContext) {
List<Predicate> predicates = new ArrayList<>();
if (this.like != null && !this.like.isEmpty()) {
if (this.like != null && !this.like.isBlank()) {
predicates.add(queryContext.CriteriaBuilder.or(
this.queryUtilsService.ilike(queryContext.CriteriaBuilder, queryContext.Root.get(DescriptionEntity._description), this.like),
this.queryUtilsService.ilike(queryContext.CriteriaBuilder, queryContext.Root.get(DescriptionEntity._label), this.like)

View File

@ -310,7 +310,7 @@ public class DescriptionTemplateQuery extends QueryBase<DescriptionTemplateEntit
inClause.value(item);
predicates.add(inClause);
}
if (this.like != null && !this.like.isEmpty()) {
if (this.like != null && !this.like.isBlank()) {
predicates.add(queryContext.CriteriaBuilder.or(this.queryUtilsService.ilike(queryContext.CriteriaBuilder, queryContext.Root.get(DescriptionTemplateEntity._label), this.like),
this.queryUtilsService.ilike(queryContext.CriteriaBuilder, queryContext.Root.get(DescriptionTemplateEntity._description), this.like)
));

View File

@ -149,7 +149,7 @@ public class DescriptionTemplateTypeQuery extends QueryBase<DescriptionTemplateT
inClause.value(item);
predicates.add(inClause);
}
if (this.like != null && !this.like.isEmpty()) {
if (this.like != null && !this.like.isBlank()) {
predicates.add(this.queryUtilsService.ilike(queryContext.CriteriaBuilder, queryContext.Root.get(DescriptionTemplateTypeEntity._name), this.like));
}
if (this.isActives != null) {

View File

@ -212,7 +212,7 @@ public class DmpBlueprintQuery extends QueryBase<DmpBlueprintEntity> {
predicates.add(notInClause.not());
}
if (this.like != null && !this.like.isEmpty()) {
if (this.like != null && !this.like.isBlank()) {
predicates.add(this.queryUtilsService.ilike(queryContext.CriteriaBuilder, queryContext.Root.get(DmpBlueprintEntity._label), this.like));
}

View File

@ -302,7 +302,7 @@ public class DmpQuery extends QueryBase<DmpEntity> {
@Override
protected <X, Y> Predicate applyFilters(QueryContext<X, Y> queryContext) {
List<Predicate> predicates = new ArrayList<>();
if (this.like != null && !this.like.isEmpty()) {
if (this.like != null && !this.like.isBlank()) {
predicates.add(this.queryUtilsService.ilike(queryContext.CriteriaBuilder, queryContext.Root.get(DmpEntity._label), this.like));
}
if (this.ids != null) {

View File

@ -148,7 +148,7 @@ public class LanguageQuery extends QueryBase<LanguageEntity> {
inClause.value(item);
predicates.add(inClause);
}
if (this.like != null && !this.like.isEmpty()) {
if (this.like != null && !this.like.isBlank()) {
predicates.add(this.queryUtilsService.ilike(queryContext.CriteriaBuilder, queryContext.Root.get(LanguageEntity._code), this.like));
}
if (this.isActives != null) {

View File

@ -149,7 +149,7 @@ public class PrefillingSourceQuery extends QueryBase<PrefillingSourceEntity> {
inClause.value(item);
predicates.add(inClause);
}
if (this.like != null && !this.like.isEmpty()) {
if (this.like != null && !this.like.isBlank()) {
predicates.add(queryContext.CriteriaBuilder.or(this.queryUtilsService.ilike(queryContext.CriteriaBuilder, queryContext.Root.get(PrefillingSourceEntity._code), this.like),
this.queryUtilsService.ilike(queryContext.CriteriaBuilder, queryContext.Root.get(PrefillingSourceEntity._label), this.like)
));

View File

@ -269,7 +269,7 @@ public class ReferenceQuery extends QueryBase<ReferenceEntity> {
inClause.value(item);
predicates.add(inClause);
}
if (this.like != null && !this.like.isEmpty()) {
if (this.like != null && !this.like.isBlank()) {
predicates.add(queryContext.CriteriaBuilder.or(this.queryUtilsService.ilike(queryContext.CriteriaBuilder, queryContext.Root.get(ReferenceEntity._label), this.like),
this.queryUtilsService.ilike(queryContext.CriteriaBuilder, queryContext.Root.get(ReferenceEntity._description), this.like),
this.queryUtilsService.ilike(queryContext.CriteriaBuilder, queryContext.Root.get(ReferenceEntity._reference), this.like)

View File

@ -150,7 +150,7 @@ public class ReferenceTypeQuery extends QueryBase<ReferenceTypeEntity> {
inClause.value(item);
predicates.add(inClause);
}
if (this.like != null && !this.like.isEmpty()) {
if (this.like != null && !this.like.isBlank()) {
predicates.add(queryContext.CriteriaBuilder.or(this.queryUtilsService.ilike(queryContext.CriteriaBuilder, queryContext.Root.get(ReferenceTypeEntity._code), this.like),
this.queryUtilsService.ilike(queryContext.CriteriaBuilder, queryContext.Root.get(ReferenceTypeEntity._name), this.like)
));

View File

@ -167,7 +167,7 @@ public class StorageFileQuery extends QueryBase<StorageFileEntity> {
@Override
protected <X, Y> Predicate applyFilters(QueryContext<X, Y> queryContext) {
List<Predicate> predicates = new ArrayList<>();
if (this.like != null && !this.like.isEmpty()) {
if (this.like != null && !this.like.isBlank()) {
predicates.add(this.queryUtilsService.ilike(queryContext.CriteriaBuilder, queryContext.Root.get(StorageFileEntity._name), this.like));
}
if (this.ids != null) {

View File

@ -166,7 +166,7 @@ public class SupportiveMaterialQuery extends QueryBase<SupportiveMaterialEntity>
inClause.value(item);
predicates.add(inClause);
}
if (this.like != null && !this.like.isEmpty()) {
if (this.like != null && !this.like.isBlank()) {
predicates.add(queryContext.CriteriaBuilder.or(this.queryUtilsService.ilike(queryContext.CriteriaBuilder, queryContext.Root.get(SupportiveMaterialEntity._languageCode), this.like),
this.queryUtilsService.ilike(queryContext.CriteriaBuilder, queryContext.Root.get(SupportiveMaterialEntity._payload), this.like)
));

View File

@ -228,7 +228,7 @@ public class TagQuery extends QueryBase<TagEntity> {
@Override
protected <X, Y> Predicate applyFilters(QueryContext<X, Y> queryContext) {
List<Predicate> predicates = new ArrayList<>();
if (this.like != null && !this.like.isEmpty()) {
if (this.like != null && !this.like.isBlank()) {
predicates.add(this.queryUtilsService.ilike(queryContext.CriteriaBuilder, queryContext.Root.get(TagEntity._label), this.like));
}
if (this.ids != null) {

View File

@ -151,7 +151,7 @@ public class TenantQuery extends QueryBase<TenantEntity> {
predicates.add(inClause);
}
if (this.like != null && !this.like.isEmpty()) {
if (this.like != null && !this.like.isBlank()) {
predicates.add(queryContext.CriteriaBuilder.or(this.queryUtilsService.ilike(queryContext.CriteriaBuilder, queryContext.Root.get(TenantEntity._code), this.like),
this.queryUtilsService.ilike(queryContext.CriteriaBuilder, queryContext.Root.get(TenantEntity._name), this.like)
));

View File

@ -196,7 +196,7 @@ public class UserQuery extends QueryBase<UserEntity> {
@Override
protected <X, Y> Predicate applyFilters(QueryContext<X, Y> queryContext) {
List<Predicate> predicates = new ArrayList<>();
if (this.like != null && !this.like.isEmpty()) {
if (this.like != null && !this.like.isBlank()) {
predicates.add(this.queryUtilsService.ilike(queryContext.CriteriaBuilder, queryContext.Root.get(UserEntity._name), this.like));
}
if (this.ids != null) {

View File

@ -183,7 +183,7 @@ public class UserSettingsQuery extends QueryBase<UserSettingsEntity> {
@Override
protected <X, Y> Predicate applyFilters(QueryContext<X, Y> queryContext) {
List<Predicate> predicates = new ArrayList<>();
if (this.like != null && !this.like.isEmpty()) {
if (this.like != null && !this.like.isBlank()) {
predicates.add(queryContext.CriteriaBuilder.or(this.queryUtilsService.ilike(queryContext.CriteriaBuilder, queryContext.Root.get(UserSettingsEntity._key), this.like),
this.queryUtilsService.ilike(queryContext.CriteriaBuilder, queryContext.Root.get(UserSettingsEntity._value), this.like)
));