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

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


        List<Join> joins = declaration.getJoins();
        int endIndex = (index == variableNameIndex) ? joinIndex : joins.size();

        for (int subIndex = joinIndex; subIndex < endIndex; subIndex++) {

          Join join = joins.get(subIndex);

          String joinVariableName = literal(
            join.getIdentificationVariable(),
            LiteralType.IDENTIFICATION_VARIABLE
          );

          if (variableName.equalsIgnoreCase(joinVariableName)) {
            return true;
View Full Code Here


    List<Join> joins = declaration.getJoins();

    for (int joinIndex = 0, joinCount = joins.size(); joinIndex < joinCount; joinIndex++) {

      Join join = joins.get(joinIndex);

      // Retrieve the identification variable from the join association path
      String variableName = literal(
        join.getJoinAssociationPath(),
        LiteralType.PATH_EXPRESSION_IDENTIFICATION_VARIABLE
      );

      // Make sure the identification variable is defined before the JOIN expression
      if (ExpressionTools.stringIsNotEmpty(variableName) &&
          isIdentificationVariableDeclaredAfter(variableName, index, joinIndex, declarations)) {

        int startPosition = position(join.getJoinAssociationPath());
        int endPosition   = startPosition + variableName.length();

        addProblem(
          expression,
          startPosition,
View Full Code Here

    if (stateObject.isDecorated()) {
      toText(stateObject);
    }
    else {
      Join expression = stateObject.getExpression();

      // JOIN
      appendIdentifier((expression != null) ? expression.getActualIdentifier() : stateObject.getJoinType(), stateObject.getJoinType());

      if (shouldOutput(expression) || expression.hasSpaceAfterJoin()) {
        writer.append(SPACE);
      }

      // Join association path
      stateObject.getJoinAssociationPathStateObject().accept(this);

      // Check first if the JOIN FETCH is allowed to have an identification variable
      if (stateObject.hasFetch()) {
        if (expression.hasAs()) {
          writer.append(SPACE);
        }
      }
      // JOIN always needs a whitespace
      else {
        if (shouldOutput(expression) || expression.hasSpaceAfterJoinAssociation()) {
          writer.append(SPACE);
        }
      }

      // AS
      if (stateObject.hasAs()) {

        appendIdentifier((expression != null) ? expression.getActualAsIdentifier() : AS, AS);

        if (shouldOutput(expression) || expression.hasSpaceAfterAs()) {
          writer.append(SPACE);
        }
      }

      // Identification variable
View Full Code Here

        List<Join> joins = declaration.getJoins();
        int endIndex = (index == variableNameIndex) ? joinIndex : joins.size();

        for (int subIndex = joinIndex; subIndex < endIndex; subIndex++) {

          Join join = joins.get(subIndex);

          String joinVariableName = literal(
            join.getIdentificationVariable(),
            LiteralType.IDENTIFICATION_VARIABLE
          );

          if (variableName.equalsIgnoreCase(joinVariableName)) {
            return true;
View Full Code Here

    List<Join> joins = declaration.getJoins();

    for (int joinIndex = 0, joinCount = joins.size(); joinIndex < joinCount; joinIndex++) {

      Join join = joins.get(joinIndex);

      // Retrieve the identification variable from the join association path
      String variableName = literal(
        join.getJoinAssociationPath(),
        LiteralType.PATH_EXPRESSION_IDENTIFICATION_VARIABLE
      );

      // Make sure the identification variable is defined before the JOIN expression
      if (ExpressionTools.stringIsNotEmpty(variableName) &&
          isIdentificationVariableDeclaredAfter(variableName, index, joinIndex, declarations)) {

        int startPosition = position(join.getJoinAssociationPath());
        int endPosition   = startPosition + variableName.length();

        addProblem(
          expression,
          startPosition,
View Full Code Here

        List<Join> joins = declaration.getJoins();
        int endIndex = (index == variableNameIndex) ? joinIndex : joins.size();

        for (int subIndex = joinIndex; subIndex < endIndex; subIndex++) {

          Join join = joins.get(subIndex);

          String joinVariableName = literal(
            join.getIdentificationVariable(),
            LiteralType.IDENTIFICATION_VARIABLE
          );

          if (variableName.equalsIgnoreCase(joinVariableName)) {
            return true;
View Full Code Here

    List<Join> joins = declaration.getJoins();

    for (int joinIndex = 0, joinCount = joins.size(); joinIndex < joinCount; joinIndex++) {

      Join join = joins.get(joinIndex);

      // Retrieve the identification variable from the join association path
      String variableName = literal(
        join.getJoinAssociationPath(),
        LiteralType.PATH_EXPRESSION_IDENTIFICATION_VARIABLE
      );

      // Make sure the identification variable is defined before the JOIN expression
      if (ExpressionTools.stringIsNotEmpty(variableName) &&
          isIdentificationVariableDeclaredAfter(variableName, index, joinIndex, declarations)) {

        int startPosition = position(join.getJoinAssociationPath());
        int endPosition   = startPosition + variableName.length();

        addProblem(
          expression,
          startPosition,
View Full Code Here

    if (stateObject.isDecorated()) {
      toText(stateObject);
    }
    else {
      Join expression = stateObject.getExpression();

      // JOIN
      appendIdentifier((expression != null) ? expression.getActualIdentifier() : stateObject.getJoinType(), stateObject.getJoinType());

      if (shouldOutput(expression) || expression.hasSpaceAfterJoin()) {
        writer.append(SPACE);
      }

      // Join association path
      stateObject.getJoinAssociationPathStateObject().accept(this);

      // Check first if the JOIN FETCH is allowed to have an identification variable
      if (stateObject.hasFetch()) {
        if (expression.hasAs()) {
          writer.append(SPACE);
        }
      }
      // JOIN always needs a whitespace
      else {
        if (shouldOutput(expression) || expression.hasSpaceAfterJoinAssociation()) {
          writer.append(SPACE);
        }
      }

      // AS
      if (stateObject.hasAs()) {

        appendIdentifier((expression != null) ? expression.getActualAsIdentifier() : AS, AS);

        if (shouldOutput(expression) || expression.hasSpaceAfterAs()) {
          writer.append(SPACE);
        }
      }

      // Identification variable
View Full Code Here

        List<Join> joins = declaration.getJoins();
        int endIndex = (index == variableNameIndex) ? joinIndex : joins.size();

        for (int subIndex = joinIndex; subIndex < endIndex; subIndex++) {

          Join join = joins.get(subIndex);

          String joinVariableName = literal(
            join.getIdentificationVariable(),
            LiteralType.IDENTIFICATION_VARIABLE
          );

          if (variableName.equalsIgnoreCase(joinVariableName)) {
            return true;
View Full Code Here

    List<Join> joins = declaration.getJoins();

    for (int joinIndex = 0, joinCount = joins.size(); joinIndex < joinCount; joinIndex++) {

      Join join = joins.get(joinIndex);

      // Retrieve the identification variable from the join association path
      String variableName = literal(
        join.getJoinAssociationPath(),
        LiteralType.PATH_EXPRESSION_IDENTIFICATION_VARIABLE
      );

      // Make sure the identification variable is defined before the JOIN expression
      if (ExpressionTools.stringIsNotEmpty(variableName) &&
          isIdentificationVariableDeclaredAfter(variableName, index, joinIndex, declarations)) {

        int startPosition = position(join.getJoinAssociationPath());
        int endPosition   = startPosition + variableName.length();

        addProblem(
          expression,
          startPosition,
View Full Code Here

TOP

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

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.