public void visit(SearchCondition<T> sc) { PrimitiveStatement statement = sc.getStatement(); if (statement != null) { if (statement.getProperty() != null) { queryStack.peek().add(buildSimpleQuery(sc.getConditionType(), statement.getProperty(), statement.getValue())); } } else { queryStack.push(new ArrayList<>()); for (SearchCondition<T> condition : sc.getSearchConditions()) { condition.accept(this); } boolean orCondition = sc.getConditionType() == ConditionType.OR; List<Filter> queries = queryStack.pop(); queryStack.peek().add(createCompositeQuery(queries, orCondition)); } }
public void visit(SearchCondition<T> sc) { PrimitiveStatement statement = sc.getStatement(); if (statement != null) { if (statement.getProperty() != null) { queryStack.peek().add(buildSimpleQuery(sc.getConditionType(), statement.getProperty(), statement.getValue())); } } else { queryStack.push(new ArrayList<>()); for (SearchCondition<T> condition : sc.getSearchConditions()) { condition.accept(this); } boolean orCondition = sc.getConditionType() == ConditionType.OR; List<Filter> queries = queryStack.pop(); queryStack.peek().add(createCompositeQuery(queries, orCondition)); } }
public void visit(SearchCondition<T> sc) { PrimitiveStatement statement = sc.getStatement(); if (statement != null) { if (statement.getProperty() != null) { queryStack.peek().add(buildSimpleQuery(sc.getConditionType(), statement.getProperty(), statement.getValue())); } } else { queryStack.push(new ArrayList<Query>()); for (SearchCondition<T> condition : sc.getSearchConditions()) { condition.accept(this); } boolean orCondition = sc.getConditionType() == ConditionType.OR; List<Query> queries = queryStack.pop(); queryStack.peek().add(createCompositeQuery(queries, orCondition)); } }
public void visit(SearchCondition<T> sc) { if (state.get() == null) { reset(); } PrimitiveStatement statement = sc.getStatement(); if (statement != null) { if (statement.getProperty() != null) { state.get().peek().add(buildSimpleQuery(sc.getConditionType(), statement.getProperty(), statement.getValue())); } } else { state.get().push(new ArrayList<>()); for (SearchCondition<T> condition : sc.getSearchConditions()) { condition.accept(this); } boolean orCondition = sc.getConditionType() == ConditionType.OR; List<Query> queries = state.get().pop(); state.get().peek().add(createCompositeQuery(queries, orCondition)); } }
public void visit(SearchCondition<T> sc) { if (state.get() == null) { reset(); } PrimitiveStatement statement = sc.getStatement(); if (statement != null) { if (statement.getProperty() != null) { state.get().peek().add(buildSimpleQuery(sc.getConditionType(), statement.getProperty(), statement.getValue())); } } else { state.get().push(new ArrayList<>()); for (SearchCondition<T> condition : sc.getSearchConditions()) { condition.accept(this); } boolean orCondition = sc.getConditionType() == ConditionType.OR; List<Query> queries = state.get().pop(); state.get().peek().add(createCompositeQuery(queries, orCondition)); } }
if (statement.getProperty() != null) { String name = getRealPropertyName(statement.getProperty()); String rvalStr = getPropertyValue(name, statement.getValue()); validatePropertyValue(name, rvalStr);
if (statement.getProperty() != null) { String name = getRealPropertyName(statement.getProperty()); String rvalStr = getPropertyValue(name, statement.getValue()); validatePropertyValue(name, rvalStr);
if (statement.getProperty() != null) { String name = getRealPropertyName(statement.getProperty()); String rvalStr = getPropertyValue(name, statement.getValue()); validatePropertyValue(name, rvalStr);
if (statement.getProperty() != null) { String name = getRealPropertyName(statement.getProperty()); String originalValue = getPropertyValue(name, statement.getValue()); validatePropertyValue(name, originalValue);
if (statement.getProperty() != null) { String property = statement.getProperty(); String[] properties = property.split("\\."); if (properties.length > 2) {
if (statement.getProperty() != null) { String property = statement.getProperty(); String[] properties = property.split("\\."); if (properties.length > 2) {
private Predicate buildPredicate(PrimitiveStatement ps) { String name = ps.getProperty(); Object propertyValue = ps.getValue(); validatePropertyValue(name, propertyValue); name = super.getRealPropertyName(name); ClassValue cv = getPrimitiveFieldClass(ps, name, ps.getValue().getClass(), ps.getValueType(), propertyValue); CollectionCheckInfo collInfo = cv.getCollectionCheckInfo(); Path<?> path = getPath(root, name, cv, collInfo); return collInfo == null ? doBuildPredicate(ps.getCondition(), path, cv.getCls(), cv.getValue()) : doBuildCollectionPredicate(ps.getCondition(), path, collInfo); }
private Predicate buildPredicate(PrimitiveStatement ps) { String name = ps.getProperty(); Object propertyValue = ps.getValue(); validatePropertyValue(name, propertyValue); name = super.getRealPropertyName(name); ClassValue cv = getPrimitiveFieldClass(ps, name, ps.getValue().getClass(), ps.getValueType(), propertyValue); CollectionCheckInfo collInfo = cv.getCollectionCheckInfo(); Path<?> path = getPath(root, name, cv, collInfo); return collInfo == null ? doBuildPredicate(ps.getCondition(), path, cv.getCls(), cv.getValue()) : doBuildCollectionPredicate(ps.getCondition(), path, collInfo); }
private Predicate buildPredicate(PrimitiveStatement ps) { String name = ps.getProperty(); Object propertyValue = ps.getValue(); validatePropertyValue(name, propertyValue); name = super.getRealPropertyName(name); ClassValue cv = getPrimitiveFieldClass(ps, name, ps.getValue().getClass(), ps.getValueType(), propertyValue); CollectionCheckInfo collInfo = cv.getCollectionCheckInfo(); Path<?> path = getPath(root, name, cv, collInfo); Predicate pred = collInfo == null ? doBuildPredicate(ps.getCondition(), path, cv.getCls(), cv.getValue()) : doBuildCollectionPredicate(ps.getCondition(), path, collInfo); return pred; }
@SuppressWarnings("ConvertToStringSwitch") private SearchCond visitPrimitive(final SearchCondition<SearchBean> sc) { String name = getRealPropertyName(sc.getStatement().getProperty()); Optional<SpecialAttr> specialAttrName = SpecialAttr.fromString(name);