public PrimitiveStatement getStatement() { return new PrimitiveStatement(propertyName, propertyValue, propertyType, cType); }
/** * {@inheritDoc} * <p> * When constructor with map is used it returns null. */ @Override public ConditionType getConditionType() { if (scts.size() > 1) { return joiningType; } return scts.get(0).getStatement().getCondition(); }
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; }
/** * {@inheritDoc} * <p> * When constructor with map is used it returns null. */ public ConditionType getConditionType() { if (scts.size() > 1) { return joiningType; } else { return scts.get(0).getStatement().getCondition(); } }
public PrimitiveStatement getStatement() { return new PrimitiveStatement(propertyName, propertyValue, propertyType, cType); }
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)); } }
/** * {@inheritDoc} * <p> * When constructor with map is used it returns null. */ @Override public ConditionType getConditionType() { if (scts.size() > 1) { return joiningType; } return scts.get(0).getStatement().getCondition(); }
public PrimitiveStatement getStatement() { return new PrimitiveStatement(propertyName, propertyValue, propertyType, cType); }
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) { 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) { String originalValue = getPropertyValue(name, statement.getValue()); validatePropertyValue(name, originalValue);