Package org.eclipse.persistence.jpa.jpql.parser

Examples of org.eclipse.persistence.jpa.jpql.parser.IdentificationVariable


      resolvers.put(internalVariableName, resolver);

      Declaration declaration = new Declaration();
      declaration.rangeDeclaration       = true;
      declaration.rootPath               = entityName;
      declaration.identificationVariable = new IdentificationVariable(null, variableName);
      declaration.lockData();
      declarations.add(declaration);
    }
  }
View Full Code Here


      return Collections.unmodifiableSet(variables);
    }

    protected Map.Entry<Join, String> buildMapEntry(Map.Entry<Join, IdentificationVariable> entry) {
      IdentificationVariable variable = entry.getValue();
      String variableName = (variable != null) ? variable.getText() : ExpressionTools.EMPTY_STRING;
      return new SimpleEntry(entry.getKey(), variableName);
    }
View Full Code Here

    DeclarationResolver declarationResolver = queryContext.getDeclarationResolverImp();

    for (Declaration declaration : declarationResolver.getDeclarations()) {

      // Register the identification variable from the base expression
      IdentificationVariable identificationVariable = declaration.identificationVariable;
      addIdentificationVariable(identificationVariable, identificationVariables);

      // Register the identification variable from the JOIN expressions
      for (IdentificationVariable joinIdentificationVariable : declaration.joins.values()) {
        addIdentificationVariable(joinIdentificationVariable, identificationVariables);
View Full Code Here

    DeclarationResolver declarationResolver = queryContext.getDeclarationResolverImp();

    for (Declaration declaration : declarationResolver.getDeclarations()) {

      // Register the identification variable from the base expression
      IdentificationVariable identificationVariable = declaration.getIdentificationVariable();
      addIdentificationVariable(identificationVariable, identificationVariables);

      // Register the identification variable from the JOIN expressions
      for (Join join : declaration.getJoins()) {
        IdentificationVariable joinIdentificationVariable = getIdentificationVariable(join.getIdentificationVariable());
        addIdentificationVariable(joinIdentificationVariable, identificationVariables);
      }
    }

    if (queryContext.getParent() == null) {
View Full Code Here

     * {@inheritDoc}
     */
    @Override
    public void visit(EntryExpression expression) {

      IdentificationVariable identificationVariable = (IdentificationVariable) expression.getExpression();
      String variableName = identificationVariable.getVariableName();

      // Retrieve the Expression for the identification variable
      declaration = queryContext.findDeclaration(variableName);
      declaration.getBaseExpression().accept(ExpressionBuilderVisitor.this);
      localExpression = queryExpression;
View Full Code Here

     * {@inheritDoc}
     */
    @Override
    public void visit(KeyExpression expression) {

      IdentificationVariable identificationVariable = (IdentificationVariable) expression.getExpression();

      // Create the Expression for the identification variable
      identificationVariable.accept(ExpressionBuilderVisitor.this);
      localExpression = new MapEntryExpression(queryExpression);

      // Retrieve the mapping's key mapping's descriptor
      descriptor = queryContext.resolveDescriptor(expression);
    }
View Full Code Here

     * {@inheritDoc}
     */
    @Override
    public void visit(ValueExpression expression) {

      IdentificationVariable identificationVariable = (IdentificationVariable) expression.getExpression();

      // Create the Expression for the identification variable
      identificationVariable.accept(ExpressionBuilderVisitor.this);
      localExpression = queryExpression;

      // Retrieve the mapping's reference descriptor
      declaration = queryContext.findDeclaration(identificationVariable.getVariableName());
      descriptor = declaration.getDescriptor();
    }
View Full Code Here

  /**
   * {@inheritDoc}
   */
  @Override
  public void visit(KeyExpression expression) {
    IdentificationVariable identificationVariable = (IdentificationVariable) expression.getExpression();
    Declaration declaration = queryContext.findDeclaration(identificationVariable.getVariableName());
    DatabaseMapping mapping = declaration.getMapping();
    MappedKeyMapContainerPolicy mapContainerPolicy = (MappedKeyMapContainerPolicy) mapping.getContainerPolicy();
    type = (Class<?>) mapContainerPolicy.getKeyType();
  }
View Full Code Here

   * {@inheritDoc}
   */
  @Override
  public void visit(ValueExpression expression) {

    IdentificationVariable identificationVariable = (IdentificationVariable) expression.getExpression();
    Declaration declaration = queryContext.findDeclaration(identificationVariable.getVariableName());
    DatabaseMapping mapping = declaration.getMapping();

    if (mapping.isDirectMapMapping()) {

      DirectMapMapping mapMapping = (DirectMapMapping) mapping;
View Full Code Here

     * {@link InputParameter}
     */
    @Override
    public void visit(KeyExpression expression) {

      IdentificationVariable identificationVariable = (IdentificationVariable) expression.getExpression();
      Declaration declaration = queryContext.getDeclaration(identificationVariable.getVariableName());
      DatabaseMapping mapping = declaration.getMapping();

      ContainerPolicy containerPolicy = mapping.getContainerPolicy();
      MappedKeyMapContainerPolicy mapPolicy = (MappedKeyMapContainerPolicy) containerPolicy;
      descriptor = mapPolicy.getKeyMapping().getReferenceDescriptor();
View Full Code Here

TOP

Related Classes of org.eclipse.persistence.jpa.jpql.parser.IdentificationVariable

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.