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

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


  protected void visitEndingExpression(Expression expression) {

    // Keep track of the original QueryPosition, the new one will differ
    // to properly accommodate for the invalid portion of the query
    QueryPosition oldQueryPosition = queryPosition;

    //
    // Step 1
    //
    // Create a new QueryPosition for which the positions is set to be at the end
View Full Code Here


        lockedExpressions.add(expression);

        // Keep track of the original QueryPosition, the new one will differ
        // to properly accommodate for the invalid portion of the query
        QueryPosition oldQueryPosition = queryPosition;

        boolean[] spaces = { false };

        //
        // Step 1
View Full Code Here

     *
     * @param invalidExpression The {@link Expression} containing the invalid fragment
     */
    public void prepare(Expression invalidExpression) {

      QueryPosition oldQueryPosition = visitor.queryPosition;

      this.invalidExpression = invalidExpression;
      this.positionWithinInvalidExpression = oldQueryPosition.getPosition(invalidExpression);
      this.queryPosition = new QueryPosition(oldQueryPosition.getPosition(invalidExpression.getParent()));
    }
View Full Code Here

   * @return The list of valid proposals regrouped by categories
   */
  public ContentAssistProposals buildContentAssistProposals(int position) {

    // Create a map of the positions within the parsed tree
    QueryPosition queryPosition = getJPQLExpression().buildPosition(
      getQuery().getExpression(),
      position
    );

    // Visit the expression, which will collect the possible proposals
    AbstractContentAssistVisitor visitor = getContentAssistVisitor();

    try {
      visitor.prepare(queryPosition);
      queryPosition.getExpression().accept(visitor);
      return visitor.getProposals();
    }
    finally {
      visitor.dispose();
    }
View Full Code Here

   */
  public ContentAssistProposals buildProposals(int position) {

    JPQLExpression jpqlExpression = getJPQLExpression();

    QueryPosition queryPosition = jpqlExpression.buildPosition(
      getQueryExpression(),
      position
    );

    prepare(queryPosition);
View Full Code Here

     *
     * @param invalidExpression The {@link Expression} containing the invalid fragment
     */
    public void prepare(Expression invalidExpression) {

      QueryPosition oldQueryPosition = AbstractContentAssistVisitor.this.queryPosition;

      this.invalidExpression = invalidExpression;
      this.positionWithinInvalidExpression = oldQueryPosition.getPosition(invalidExpression);
      this.queryPosition = new QueryPosition(oldQueryPosition.getPosition(invalidExpression.getParent()));
    }
View Full Code Here

  protected void visitEndingExpression(Expression expression) {

    // Keep track of the original QueryPosition, the new one will differ
    // to properly accommodate for the invalid portion of the query
    QueryPosition oldQueryPosition = queryPosition;

    //
    // Step 1
    //
    // Create a new QueryPosition for which the positions is set to be at the end
View Full Code Here

        lockedExpressions.add(expression);

        // Keep track of the original QueryPosition, the new one will differ
        // to properly accommodate for the invalid portion of the query
        QueryPosition oldQueryPosition = queryPosition;

        boolean[] spaces = { false };

        //
        // Step 1
View Full Code Here

TOP

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

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.