Examples of IdentificationVariable


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

    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

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

     * {@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

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

     * {@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

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

     * {@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

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

  /**
   * {@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

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

   * {@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

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

     * {@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

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

    /**
     * {@link InputParameter}
     */
    @Override
    public void visit(ValueExpression expression) {
      IdentificationVariable identificationVariable = (IdentificationVariable) expression.getExpression();
      Declaration declaration = queryContext.getDeclaration(identificationVariable.getVariableName());
      descriptor = declaration.getDescriptor();
    }
View Full Code Here

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

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

    IdentificationVariable variable = (IdentificationVariable) expression.getIdentificationVariable();
    Declaration declaration = queryContext.getDeclaration(variable.getVariableName());

    switch (declaration.getType()) {

      // If the Declaration is RangeDeclaration, then retrieve its Descriptor directly,
      // this will support two cases automatically, the "root" object is
View Full Code Here

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

   */
  @Override
  public void visit(ResultVariable expression) {

    expression.getSelectExpression().accept(this);
    IdentificationVariable identificationVariable = (IdentificationVariable) expression.getResultVariable();
    String variableName = identificationVariable.getVariableName();
    queryContext.addQueryExpression(variableName, queryExpression);

    // Note: The type will be calculated when traversing the select expression
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.