@Override public Expression get(ExpressionFactory expressionFactory, String expression, boolean allowQuantifiedPredicates, MacroConfiguration macroConfiguration, Set<String> usedMacros) { return expressionFactory.createPathExpression(expression, macroConfiguration, usedMacros); } };
@Override public Expression get(ExpressionFactory expressionFactory, String expression, boolean allowQuantifiedPredicates, MacroConfiguration macroConfiguration, Set<String> usedMacros) { return expressionFactory.createPathExpression(expression, macroConfiguration, usedMacros); } };
@Override public PathExpression createPathExpression(String expression) { return delegate.createPathExpression(expression); }
@Override public PathExpression createPathExpression(String expression, MacroConfiguration macroConfiguration, Set<String> usedMacros) { return expressionFactory.createPathExpression(expression, macroConfiguration, usedMacros); }
@Override public PathExpression createPathExpression(String expression) { return delegate.createPathExpression(expression); }
@Override public PathExpression createPathExpression(String expression, MacroConfiguration macroConfiguration, Set<String> usedMacros) { return delegate.createPathExpression(expression, macroConfiguration, usedMacros); }
@Override public PathExpression createPathExpression(String expression, MacroConfiguration macroConfiguration, Set<String> usedMacros) { return expressionFactory.createPathExpression(expression, macroConfiguration, usedMacros); }
@Override public PathExpression createPathExpression(String expression, MacroConfiguration macroConfiguration, Set<String> usedMacros) { return delegate.createPathExpression(expression, macroConfiguration, usedMacros); }
@Override public PathExpression createPathExpression(String expression) { return expressionFactory.createPathExpression(expression, getDefaultMacroConfiguration(), null); }
private Type<?> getPathType(Type<?> baseType, String expression, PathExpression pathExpression) { try { return JpaUtils.getAttributeForJoining(metamodel, baseType, expressionFactory.createPathExpression(expression), null).getAttributeType(); } catch (IllegalArgumentException ex) { throw new IllegalArgumentException("The join path [" + pathExpression + "] has a non joinable part [" + expression + "]", ex); } }
public JoinNode getFromByPath(String path) { if (path == null || path.isEmpty()) { JoinNode node = joinManager.getRootNodeOrFail("No or multiple query roots, can't find single root!"); return node; } PathExpression pathExpression = expressionFactory.createPathExpression(path); joinManager.implicitJoin(pathExpression, true, true, null, null, new HashSet<String>(), false, false, true, false); return (JoinNode) pathExpression.getBaseNode(); }
@Override @SuppressWarnings("unchecked") public X fetch(String path) { prepareForModification(ClauseType.JOIN); verifyBuilderEnded(); joinManager.implicitJoin(expressionFactory.createPathExpression(path), true, true, null, null, null, new HashSet<String>(), false, false, true, false, true, false); return (X) this; }
@Override @SuppressWarnings("unchecked") public X fetch(String... paths) { prepareForModification(ClauseType.JOIN); verifyBuilderEnded(); HashSet<String> currentlyResolvingAliases = new HashSet<>(); for (String path : paths) { joinManager.implicitJoin(expressionFactory.createPathExpression(path), true, true, null, null, null, currentlyResolvingAliases, false, false, true, false, true, false); } return (X) this; }
private javax.persistence.metamodel.Attribute<?, ?> getUpdateMappableAttribute(String mapping, MetamodelBuildingContext context) { try { UpdatableExpressionVisitor visitor = new UpdatableExpressionVisitor(context.getEntityMetamodel(), declaringType.getEntityClass(), true); context.getExpressionFactory().createPathExpression(mapping).accept(visitor); Iterator<javax.persistence.metamodel.Attribute<?, ?>> iterator = visitor.getPossibleTargets().keySet().iterator(); if (iterator.hasNext()) { return iterator.next(); } } catch (Exception ex) { // Don't care about the actual exception as that will be thrown anyway when validating the expressions later } return null; }
public Path getPath(String path) { if (path == null || path.isEmpty()) { JoinNode node = joinManager.getRootNodeOrFail("No or multiple query roots, can't find single root!"); return new SimplePathReference(node, null, node.getType()); } PathExpression pathExpression = expressionFactory.createPathExpression(path); joinManager.implicitJoin(pathExpression, true, true, null, null, new HashSet<String>(), false, false, true, false); return (Path) pathExpression.getPathReference(); }
@Override public T isMemberOf(String expression) { return chain(new MemberOfPredicate(leftExpression, makeCollectionValued(expressionFactory.createPathExpression(expression)))); }
@Override public T isNotMemberOf(String expression) { return chain(new MemberOfPredicate(leftExpression, makeCollectionValued(expressionFactory.createPathExpression(expression)), true)); }
@SuppressWarnings("unchecked") public BuilderType groupBy(String expression) { prepareForModification(ClauseType.GROUP_BY); Expression expr; if (mainQuery.getQueryConfiguration().isCompatibleModeEnabled()) { expr = expressionFactory.createPathExpression(expression); } else { expr = expressionFactory.createSimpleExpression(expression, false); } verifyBuilderEnded(); groupByManager.groupBy(expr); return (BuilderType) this; }
context.getExpressionFactory().createPathExpression(mapping).accept(visitor); Map<Attribute<?, ?>, javax.persistence.metamodel.Type<?>> possibleTargets = visitor.getPossibleTargets();
for (String value : writableMappedByMappings.values()) { visitor.reset(elementJpaType); context.getTypeValidationExpressionFactory().createPathExpression(value).accept(visitor); Map<Attribute<?, ?>, javax.persistence.metamodel.Type<?>> possibleTargets = visitor.getPossibleTargets(); if (possibleTargets.size() > 1) {