/** * {@inheritDoc} */ @Override public void visit(RangeVariableDeclaration expression) { DerivedDeclaration derivedDeclaration = new DerivedDeclaration(queryContext); derivedDeclaration.joins = declaration.joins; derivedDeclaration.rootPath = declaration.rootPath; derivedDeclaration.baseExpression = declaration.baseExpression; derivedDeclaration.identificationVariable = declaration.identificationVariable; declaration = derivedDeclaration; expression.setVirtualIdentificationVariable(outerVariableName, declaration.rootPath); expression.getRootObject().accept(this); } }
/** * {@inheritDoc} */ @Override DatabaseMapping resolveMapping() { return queryContext.resolveMapping(getBaseExpression().getRootObject()); } }
Expression buildQueryExpression() { DatabaseMapping mapping = resolveMapping();
Expression buildQueryExpression() { DatabaseMapping mapping = resolveMapping();
/** * {@inheritDoc} */ @Override public void visit(RangeVariableDeclaration expression) { DerivedDeclaration derivedDeclaration = new DerivedDeclaration(queryContext); derivedDeclaration.joins = declaration.joins; derivedDeclaration.rootPath = declaration.rootPath; derivedDeclaration.baseExpression = declaration.baseExpression; derivedDeclaration.identificationVariable = declaration.identificationVariable; declaration = derivedDeclaration; expression.setVirtualIdentificationVariable(outerVariableName, declaration.rootPath); expression.getRootObject().accept(this); } }
/** * {@inheritDoc} */ @Override ClassDescriptor resolveDescriptor() { return queryContext.resolveDescriptor(getBaseExpression().getRootObject()); }
/** * {@inheritDoc} */ @Override public void visit(CollectionValuedPathExpression expression) { String rootPath = expression.toParsedText(); // Check to see if the "root" path is a class name before assuming it's a derived path Class<?> type = queryContext.getType(rootPath); // Fully qualified class name if (type != null) { RangeDeclaration declaration = new RangeDeclaration(queryContext); declaration.type = type; currentDeclaration = declaration; } // Derived path expression (for subqueries) else { currentDeclaration = new DerivedDeclaration(queryContext); } currentDeclaration.rootPath = rootPath; }
/** * {@inheritDoc} */ @Override ClassDescriptor resolveDescriptor() { return queryContext.resolveDescriptor(getBaseExpression().getRootObject()); }
/** * {@inheritDoc} */ @Override public void visit(CollectionValuedPathExpression expression) { String rootPath = expression.toParsedText(); // Check to see if the "root" path is a class name before assuming it's a derived path Class<?> type = queryContext.getType(rootPath); // Fully qualified class name if (type != null) { RangeDeclaration declaration = new RangeDeclaration(queryContext); declaration.type = type; currentDeclaration = declaration; } // Derived path expression (for subqueries) else { currentDeclaration = new DerivedDeclaration(queryContext); } currentDeclaration.rootPath = rootPath; }
/** * {@inheritDoc} */ @Override DatabaseMapping resolveMapping() { return queryContext.resolveMapping(getBaseExpression().getRootObject()); } }
/** * {@inheritDoc} */ @Override public void visit(AbstractSchemaName expression) { String rootPath = expression.getText(); // Abstract schema name (entity name) if (rootPath.indexOf('.') == -1) { currentDeclaration = new RangeDeclaration(queryContext); } else { // Check to see if the "root" path is a class name before assuming it's a derived path Class<?> type = queryContext.getType(rootPath); // Fully qualified class name if (type != null) { RangeDeclaration declaration = new RangeDeclaration(queryContext); declaration.type = type; currentDeclaration = declaration; } // Derived path expression (for subqueries) else { currentDeclaration = new DerivedDeclaration(queryContext); } } currentDeclaration.rootPath = rootPath; }
/** * {@inheritDoc} */ @Override public void visit(AbstractSchemaName expression) { String rootPath = expression.getText(); // Abstract schema name (entity name) if (rootPath.indexOf('.') == -1) { currentDeclaration = new RangeDeclaration(queryContext); } else { // Check to see if the "root" path is a class name before assuming it's a derived path Class<?> type = queryContext.getType(rootPath); // Fully qualified class name if (type != null) { RangeDeclaration declaration = new RangeDeclaration(queryContext); declaration.type = type; currentDeclaration = declaration; } // Derived path expression (for subqueries) else { currentDeclaration = new DerivedDeclaration(queryContext); } } currentDeclaration.rootPath = rootPath; }