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)); } }
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); }
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)); } }
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); }
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)); } }
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; }
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);
String originalValue = getPropertyValue(name, statement.getValue()); validatePropertyValue(name, originalValue);
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);
String originalValue = getPropertyValue(name, statement.getValue()); validatePropertyValue(name, originalValue);
URLDecoder.decode(sc.getStatement().getValue().toString(), StandardCharsets.UTF_8), false). replaceAll("\\\\_", "_");