reports-service: http://jira.mfd.msk:8088/browse/CLS-711
This commit is contained in:
parent
048eba8b11
commit
3f57080c16
1 changed files with 7 additions and 1 deletions
|
|
@ -42,16 +42,19 @@ public class DBPredicateBuilder extends ImdgPredicateBuilderHazelcast {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public ImdgPredicate equals(String key, Object value) {
|
public ImdgPredicate equals(String key, Object value) {
|
||||||
|
if (value == null) return isNull(key);
|
||||||
return new DBPredicate(" (%s = %s) ".formatted(replaceKey(key), replaceValue(value)));
|
return new DBPredicate(" (%s = %s) ".formatted(replaceKey(key), replaceValue(value)));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public ImdgPredicate greatEqual(String key, Comparable value) {
|
public ImdgPredicate greatEqual(String key, Comparable value) {
|
||||||
|
if (value == null) return isNull(key);
|
||||||
return new DBPredicate(" (%s >= %s) ".formatted(replaceKey(key), replaceValue(value)));
|
return new DBPredicate(" (%s >= %s) ".formatted(replaceKey(key), replaceValue(value)));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public ImdgPredicate lessEqual(String key, Comparable value) {
|
public ImdgPredicate lessEqual(String key, Comparable value) {
|
||||||
|
if (value == null) return isNull(key);
|
||||||
return new DBPredicate(" (%s <= %s) ".formatted(replaceKey(key), replaceValue(value)));
|
return new DBPredicate(" (%s <= %s) ".formatted(replaceKey(key), replaceValue(value)));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -77,6 +80,9 @@ public class DBPredicateBuilder extends ImdgPredicateBuilderHazelcast {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public ImdgPredicate in(String key, Comparable... values) {
|
public ImdgPredicate in(String key, Comparable... values) {
|
||||||
|
if (values == null || values.length == 0) {
|
||||||
|
return new DBPredicate(" (false) ");
|
||||||
|
}
|
||||||
return new DBPredicate(
|
return new DBPredicate(
|
||||||
" (%s in (%s)) ".formatted(
|
" (%s in (%s)) ".formatted(
|
||||||
replaceKey(key),
|
replaceKey(key),
|
||||||
|
|
@ -94,7 +100,7 @@ public class DBPredicateBuilder extends ImdgPredicateBuilderHazelcast {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public ImdgPredicate not(ImdgPredicate param) {
|
public ImdgPredicate not(ImdgPredicate param) {
|
||||||
throw new UnsupportedOperationException("not implemented");
|
return new DBPredicate(" (not (%s)) ".formatted(param.toString()));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue