@Override public String getDisplayText() { StringBuilder buf = new StringBuilder(); FromElement fromElement = getFromElement(); buf.append( "{propertyName=" ).append( propertyName ); buf.append( ",dereferenceType=" ).append( dereferenceType.name() ); buf.append( ",getPropertyPath=" ).append( propertyPath ); buf.append( ",path=" ).append( getPath() ); if ( fromElement != null ) { buf.append( ",tableAlias=" ).append( fromElement.getTableAlias() ); buf.append( ",className=" ).append( fromElement.getClassName() ); buf.append( ",classAlias=" ).append( fromElement.getClassAlias() ); } else { buf.append( ",no from element" ); } buf.append( '}' ); return buf.toString(); }
String propertyPath = String.join( ".", this.propertyPath, propertyName ); try { Type propertyType = getFromElement().getPropertyType( this.propertyPath, propertyPath ); return propertyType != null;
private String[] getColumns() throws QueryException { if ( columns == null ) { // Use the table fromElement and the property name to get the array of column names. String tableAlias = getLhs().getFromElement().getTableAlias(); columns = getFromElement().toColumns( tableAlias, propertyPath, false ); } return columns; }
private boolean isCorrelatedSubselect() { return getWalker().isSubQuery() && getFromElement().getFromClause() != getWalker().getCurrentFromClause(); }
private void prepareAnyImplicitJoins(DotNode dotNode) throws SemanticException { if ( dotNode.getLhs() instanceof DotNode ) { DotNode lhs = (DotNode) dotNode.getLhs(); FromElement lhsOrigin = lhs.getFromElement(); if ( lhsOrigin != null && "".equals( lhsOrigin.getText() ) ) { String lhsOriginText = lhsOrigin.getQueryable().getTableName() + " " + lhsOrigin.getTableAlias(); lhsOrigin.setText( lhsOriginText ); } prepareAnyImplicitJoins( lhs ); } }
FromElement fromElement = dotNode.getFromElement(); if ( referencedFromElement != null ) {
private void dereferenceEntityIdentifier(String propertyName, DotNode dotParent) { // special shortcut for id properties, skip the join! // this must only occur at the _end_ of a path expression if ( LOG.isDebugEnabled() ) { LOG.debugf( "dereferenceShortcut() : property %s in %s does not require a join.", propertyName, getFromElement().getClassName() ); } setPropertyNameAndPath( dotParent ); // Set the unresolved path in this node and the parent. initText(); // Set the text for the parent. if ( dotParent != null ) { dotParent.dereferenceType = DereferenceType.IDENTIFIER; dotParent.setText( getText() ); dotParent.columns = getColumns(); } }
Type type = getDataType(); if ( type.isEntityType() ) { FromElement fromElement = getFromElement(); fromElement.setIncludeSubclasses( true ); // Tell the destination fromElement to 'includeSubclasses'. if ( useThetaStyleImplicitJoins ) {
columns = getFromElement().toColumns( lhsTableName, propertyPath, false, true );
"dereferenceEntityJoin() : generating join for %s in %s (%s) parent = %s", propertyName, getFromElement().getClassName(), classAlias == null ? "<no alias>" : classAlias, ASTUtil.getDebugString( parent )
@Override public String getDisplayText() { StringBuilder buf = new StringBuilder(); FromElement fromElement = getFromElement(); buf.append( "{propertyName=" ).append( propertyName ); buf.append( ",dereferenceType=" ).append( getWalker().getASTPrinter().getTokenTypeName( dereferenceType ) ); buf.append( ",propertyPath=" ).append( propertyPath ); buf.append( ",path=" ).append( getPath() ); if ( fromElement != null ) { buf.append( ",tableAlias=" ).append( fromElement.getTableAlias() ); buf.append( ",className=" ).append( fromElement.getClassName() ); buf.append( ",classAlias=" ).append( fromElement.getClassAlias() ); } else { buf.append( ",no from element" ); } buf.append( '}' ); return buf.toString(); }
@Override public String getDisplayText() { StringBuilder buf = new StringBuilder(); FromElement fromElement = getFromElement(); buf.append( "{propertyName=" ).append( propertyName ); buf.append( ",dereferenceType=" ).append( getWalker().getASTPrinter().getTokenTypeName( dereferenceType ) ); buf.append( ",propertyPath=" ).append( propertyPath ); buf.append( ",path=" ).append( getPath() ); if ( fromElement != null ) { buf.append( ",tableAlias=" ).append( fromElement.getTableAlias() ); buf.append( ",className=" ).append( fromElement.getClassName() ); buf.append( ",classAlias=" ).append( fromElement.getClassAlias() ); } else { buf.append( ",no from element" ); } buf.append( '}' ); return buf.toString(); }
private String[] getColumns() throws QueryException { if ( columns == null ) { // Use the table fromElement and the property name to get the array of column names. String tableAlias = getLhs().getFromElement().getTableAlias(); columns = getFromElement().toColumns( tableAlias, propertyPath, false ); } return columns; }
private String[] getColumns() throws QueryException { if ( columns == null ) { // Use the table fromElement and the property name to get the array of column names. String tableAlias = getLhs().getFromElement().getTableAlias(); columns = getFromElement().toColumns( tableAlias, propertyPath, false ); } return columns; }
private void prepareAnyImplicitJoins(DotNode dotNode) throws SemanticException { if ( dotNode.getLhs() instanceof DotNode ) { DotNode lhs = ( DotNode ) dotNode.getLhs(); FromElement lhsOrigin = lhs.getFromElement(); if ( lhsOrigin != null && "".equals( lhsOrigin.getText() ) ) { String lhsOriginText = lhsOrigin.getQueryable().getTableName() + " " + lhsOrigin.getTableAlias(); lhsOrigin.setText( lhsOriginText ); } prepareAnyImplicitJoins( lhs ); } }
private boolean isCorrelatedSubselect() { return getWalker().isSubQuery() && getFromElement().getFromClause() != getWalker().getCurrentFromClause(); }
private boolean isCorrelatedSubselect() { return getWalker().isSubQuery() && getFromElement().getFromClause() != getWalker().getCurrentFromClause(); }
private void prepareAnyImplicitJoins(DotNode dotNode) throws SemanticException { if ( dotNode.getLhs() instanceof DotNode ) { DotNode lhs = ( DotNode ) dotNode.getLhs(); FromElement lhsOrigin = lhs.getFromElement(); if ( lhsOrigin != null && "".equals( lhsOrigin.getText() ) ) { String lhsOriginText = lhsOrigin.getQueryable().getTableName() + " " + lhsOrigin.getTableAlias(); lhsOrigin.setText( lhsOriginText ); } prepareAnyImplicitJoins( lhs ); } }
private void dereferenceEntityIdentifier(String propertyName, DotNode dotParent) { // special shortcut for id properties, skip the join! // this must only occur at the _end_ of a path expression if ( LOG.isDebugEnabled() ) { LOG.debugf( "dereferenceShortcut() : property %s in %s does not require a join.", propertyName, getFromElement().getClassName() ); } initText(); setPropertyNameAndPath( dotParent ); // Set the unresolved path in this node and the parent. // Set the text for the parent. if ( dotParent != null ) { dotParent.dereferenceType = DEREF_IDENTIFIER; dotParent.setText( getText() ); dotParent.columns = getColumns(); } }
private void dereferenceEntityIdentifier(String propertyName, DotNode dotParent) { // special shortcut for id properties, skip the join! // this must only occur at the _end_ of a path expression if ( LOG.isDebugEnabled() ) { LOG.debugf( "dereferenceShortcut() : property %s in %s does not require a join.", propertyName, getFromElement().getClassName() ); } initText(); setPropertyNameAndPath( dotParent ); // Set the unresolved path in this node and the parent. // Set the text for the parent. if ( dotParent != null ) { dotParent.dereferenceType = DEREF_IDENTIFIER; dotParent.setText( getText() ); dotParent.columns = getColumns(); } }