Package org.hibernate.hql.ast.tree

Examples of org.hibernate.hql.ast.tree.FromReferenceNode


  }

  protected void lookupAlias(AST aliasRef)
      throws SemanticException {
    FromElement alias = currentFromClause.getFromElement( aliasRef.getText() );
    FromReferenceNode aliasRefNode = ( FromReferenceNode ) aliasRef;
    aliasRefNode.setFromElement( alias );
  }
View Full Code Here


    return impliedJoinType;
  }

  protected AST lookupProperty(AST dot, boolean root, boolean inSelect) throws SemanticException {
    DotNode dotNode = ( DotNode ) dot;
    FromReferenceNode lhs = dotNode.getLhs();
    AST rhs = lhs.getNextSibling();
    switch ( rhs.getType() ) {
      case SqlTokenTypes.ELEMENTS:
      case SqlTokenTypes.INDICES:
        if ( log.isDebugEnabled() ) {
          log.debug( "lookupProperty() " + dotNode.getPath() + " => " + rhs.getText() + "(" + lhs.getPath() + ")" );
        }
        CollectionFunction f = ( CollectionFunction ) rhs;
        // Re-arrange the tree so that the collection function is the root and the lhs is the path.
        f.setFirstChild( lhs );
        lhs.setNextSibling( null );
        dotNode.setFirstChild( f );
        resolve( lhs );      // Don't forget to resolve the argument!
        f.resolve( inSelect )// Resolve the collection function now.
        return f;
      default:
View Full Code Here

        DotNode dot = ( DotNode ) node;
        dot.resolveSelectExpression();
        break;
      case ALIAS_REF:
        // Notify the FROM element that it is being referenced by the select.
        FromReferenceNode aliasRefNode = ( FromReferenceNode ) node;
        //aliasRefNode.resolve( false, false, aliasRefNode.getText() ); //TODO: is it kosher to do it here?
        aliasRefNode.resolve( false, false ); //TODO: is it kosher to do it here?
        FromElement fromElement = aliasRefNode.getFromElement();
        if ( fromElement != null ) {
          fromElement.setIncludeSubclasses( true );
        }
      default:
        break;
View Full Code Here

  }

  protected void lookupAlias(AST aliasRef)
      throws SemanticException {
    FromElement alias = currentFromClause.getFromElement( aliasRef.getText() );
    FromReferenceNode aliasRefNode = ( FromReferenceNode ) aliasRef;
    aliasRefNode.setFromElement( alias );
  }
View Full Code Here

    return impliedJoinType;
  }

  protected AST lookupProperty(AST dot, boolean root, boolean inSelect) throws SemanticException {
    DotNode dotNode = ( DotNode ) dot;
    FromReferenceNode lhs = dotNode.getLhs();
    AST rhs = lhs.getNextSibling();
    switch ( rhs.getType() ) {
      case SqlTokenTypes.ELEMENTS:
      case SqlTokenTypes.INDICES:
        if ( log.isDebugEnabled() ) {
          log.debug( "lookupProperty() " + dotNode.getPath() + " => " + rhs.getText() + "(" + lhs.getPath() + ")" );
        }
        CollectionFunction f = ( CollectionFunction ) rhs;
        // Re-arrange the tree so that the collection function is the root and the lhs is the path.
        f.setFirstChild( lhs );
        lhs.setNextSibling( null );
        dotNode.setFirstChild( f );
        resolve( lhs );      // Don't forget to resolve the argument!
        f.resolve( inSelect )// Resolve the collection function now.
        return f;
      default:
View Full Code Here

        DotNode dot = ( DotNode ) node;
        dot.resolveSelectExpression();
        break;
      case ALIAS_REF:
        // Notify the FROM element that it is being referenced by the select.
        FromReferenceNode aliasRefNode = ( FromReferenceNode ) node;
        //aliasRefNode.resolve( false, false, aliasRefNode.getText() ); //TODO: is it kosher to do it here?
        aliasRefNode.resolve( false, false ); //TODO: is it kosher to do it here?
        FromElement fromElement = aliasRefNode.getFromElement();
        if ( fromElement != null ) {
          fromElement.setIncludeSubclasses( true );
        }
      default:
        break;
View Full Code Here

  }

  protected void lookupAlias(AST aliasRef)
      throws SemanticException {
    FromElement alias = currentFromClause.getFromElement( aliasRef.getText() );
    FromReferenceNode aliasRefNode = ( FromReferenceNode ) aliasRef;
    aliasRefNode.setFromElement( alias );
  }
View Full Code Here

    return impliedJoinType;
  }

  protected AST lookupProperty(AST dot, boolean root, boolean inSelect) throws SemanticException {
    DotNode dotNode = ( DotNode ) dot;
    FromReferenceNode lhs = dotNode.getLhs();
    AST rhs = lhs.getNextSibling();
    switch ( rhs.getType() ) {
      case SqlTokenTypes.ELEMENTS:
      case SqlTokenTypes.INDICES:
        if ( log.isDebugEnabled() ) {
          log.debug( "lookupProperty() " + dotNode.getPath() + " => " + rhs.getText() + "(" + lhs.getPath() + ")" );
        }
        CollectionFunction f = ( CollectionFunction ) rhs;
        // Re-arrange the tree so that the collection function is the root and the lhs is the path.
        f.setFirstChild( lhs );
        lhs.setNextSibling( null );
        dotNode.setFirstChild( f );
        resolve( lhs );      // Don't forget to resolve the argument!
        f.resolve( inSelect )// Resolve the collection function now.
        return f;
      default:
View Full Code Here

        DotNode dot = ( DotNode ) node;
        dot.resolveSelectExpression();
        break;
      case ALIAS_REF:
        // Notify the FROM element that it is being referenced by the select.
        FromReferenceNode aliasRefNode = ( FromReferenceNode ) node;
        //aliasRefNode.resolve( false, false, aliasRefNode.getText() ); //TODO: is it kosher to do it here?
        aliasRefNode.resolve( false, false ); //TODO: is it kosher to do it here?
        FromElement fromElement = aliasRefNode.getFromElement();
        if ( fromElement != null ) {
          fromElement.setIncludeSubclasses( true );
        }
      default:
        break;
View Full Code Here

  }

  protected void lookupAlias(AST aliasRef)
      throws SemanticException {
    FromElement alias = currentFromClause.getFromElement( aliasRef.getText() );
    FromReferenceNode aliasRefNode = ( FromReferenceNode ) aliasRef;
    aliasRefNode.setFromElement( alias );
  }
View Full Code Here

TOP

Related Classes of org.hibernate.hql.ast.tree.FromReferenceNode

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.