public FromReferenceNode getLhs() { FromReferenceNode lhs = ( (FromReferenceNode) getFirstChild() ); if ( lhs == null ) { throw new IllegalStateException( "DOT node with no left-hand-side!" ); } return lhs; }
private void setImpliedJoin(FromElement elem) { this.impliedJoin = elem; if ( getFirstChild().getType() == SqlTokenTypes.DOT ) { DotNode dotLhs = (DotNode) getFirstChild(); if ( dotLhs.getImpliedJoin() != null ) { this.impliedJoin = dotLhs.getImpliedJoin(); } } }
private void setPropertyNameAndPath(AST parent) { if ( isDotNode( parent ) ) { DotNode dotNode = (DotNode) parent; AST lhs = dotNode.getFirstChild(); AST rhs = lhs.getNextSibling(); propertyName = rhs.getText(); propertyPath = propertyPath + "." + propertyName; // Append the new property name onto the unresolved path. dotNode.propertyPath = propertyPath; LOG.debugf( "Unresolved property path is now '%s'", dotNode.propertyPath ); } else { LOG.debugf( "Terminal getPropertyPath = [%s]", propertyPath ); } }
/** * Resolves the left hand side of the DOT. * * @throws SemanticException */ @Override public void resolveFirstChild() throws SemanticException { FromReferenceNode lhs = (FromReferenceNode) getFirstChild(); SqlNode property = (SqlNode) lhs.getNextSibling(); // Set the attributes of the property reference expression. String propName = property.getText(); propertyName = propName; // If the uresolved property path isn't set yet, just use the property name. if ( propertyPath == null ) { propertyPath = propName; } // Resolve the LHS fully, generate implicit joins. Pass in the property name so that the resolver can // discover foreign key (id) properties. lhs.resolve( true, true, null, this ); setFromElement( lhs.getFromElement() ); // The 'from element' that the property is in. checkSubclassOrSuperclassPropertyReference( lhs, propName ); }
public FromReferenceNode getLhs() { FromReferenceNode lhs = ( ( FromReferenceNode ) getFirstChild() ); if ( lhs == null ) { throw new IllegalStateException( "DOT node with no left-hand-side!" ); } return lhs; }
public FromReferenceNode getLhs() { FromReferenceNode lhs = ( ( FromReferenceNode ) getFirstChild() ); if ( lhs == null ) { throw new IllegalStateException( "DOT node with no left-hand-side!" ); } return lhs; }
private void setImpliedJoin(FromElement elem) { this.impliedJoin = elem; if ( getFirstChild().getType() == SqlTokenTypes.DOT ) { DotNode dotLhs = ( DotNode ) getFirstChild(); if ( dotLhs.getImpliedJoin() != null ) { this.impliedJoin = dotLhs.getImpliedJoin(); } } }
private void setImpliedJoin(FromElement elem) { this.impliedJoin = elem; if ( getFirstChild().getType() == SqlTokenTypes.DOT ) { DotNode dotLhs = ( DotNode ) getFirstChild(); if ( dotLhs.getImpliedJoin() != null ) { this.impliedJoin = dotLhs.getImpliedJoin(); } } }
private void setPropertyNameAndPath(AST parent) { if ( isDotNode( parent ) ) { DotNode dotNode = ( DotNode ) parent; AST lhs = dotNode.getFirstChild(); AST rhs = lhs.getNextSibling(); propertyName = rhs.getText(); propertyPath = propertyPath + "." + propertyName; // Append the new property name onto the unresolved path. dotNode.propertyPath = propertyPath; LOG.debugf( "Unresolved property path is now '%s'", dotNode.propertyPath ); } else { LOG.debugf( "Terminal propertyPath = [%s]", propertyPath ); } }
private void setPropertyNameAndPath(AST parent) { if ( isDotNode( parent ) ) { DotNode dotNode = ( DotNode ) parent; AST lhs = dotNode.getFirstChild(); AST rhs = lhs.getNextSibling(); propertyName = rhs.getText(); propertyPath = propertyPath + "." + propertyName; // Append the new property name onto the unresolved path. dotNode.propertyPath = propertyPath; LOG.debugf( "Unresolved property path is now '%s'", dotNode.propertyPath ); } else { LOG.debugf( "Terminal propertyPath = [%s]", propertyPath ); } }
/** * Resolves the left hand side of the DOT. * * @throws SemanticException */ @Override public void resolveFirstChild() throws SemanticException { FromReferenceNode lhs = ( FromReferenceNode ) getFirstChild(); SqlNode property = ( SqlNode ) lhs.getNextSibling(); // Set the attributes of the property reference expression. String propName = property.getText(); propertyName = propName; // If the uresolved property path isn't set yet, just use the property name. if ( propertyPath == null ) { propertyPath = propName; } // Resolve the LHS fully, generate implicit joins. Pass in the property name so that the resolver can // discover foreign key (id) properties. lhs.resolve( true, true, null, this ); setFromElement( lhs.getFromElement() ); // The 'from element' that the property is in. checkSubclassOrSuperclassPropertyReference( lhs, propName ); }
/** * Resolves the left hand side of the DOT. * * @throws SemanticException */ @Override public void resolveFirstChild() throws SemanticException { FromReferenceNode lhs = ( FromReferenceNode ) getFirstChild(); SqlNode property = ( SqlNode ) lhs.getNextSibling(); // Set the attributes of the property reference expression. String propName = property.getText(); propertyName = propName; // If the uresolved property path isn't set yet, just use the property name. if ( propertyPath == null ) { propertyPath = propName; } // Resolve the LHS fully, generate implicit joins. Pass in the property name so that the resolver can // discover foreign key (id) properties. lhs.resolve( true, true, null, this ); setFromElement( lhs.getFromElement() ); // The 'from element' that the property is in. checkSubclassOrSuperclassPropertyReference( lhs, propName ); }