public Optional < String > getAlias ( final String name ) { if ( containStar ) { return Optional . absent ( ) ; } String rawName = SQLUtil . getExactlyValue ( name ) ; for ( SelectItem each : items ) { if ( SQLUtil . getExactlyExpression ( rawName ) . equalsIgnoreCase ( SQLUtil . getExactlyExpression ( SQLUtil . getExactlyValue ( each . getExpression ( ) ) ) ) ) { return each . getAlias ( ) ; } if ( rawName . equalsIgnoreCase ( each . getAlias ( ) . orNull ( ) ) ) { return Optional . of ( rawName ) ; } } return Optional . absent ( ) ; }
Get alias .