// EXISTS expressions need to be Boolean
if (subquerySqlExpr instanceof org.datanucleus.store.rdbms.sql.expression.SubqueryExpression)
{
SQLStatement subStmt =
((org.datanucleus.store.rdbms.sql.expression.SubqueryExpression)subquerySqlExpr).getSubqueryStatement();
subquerySqlExpr = new BooleanSubqueryExpression(stmt, keyword, subStmt);
}
else
{
SQLStatement subStmt = ((SubqueryExpressionComponent)subquerySqlExpr).getSubqueryStatement();
subquerySqlExpr = new BooleanSubqueryExpression(stmt, keyword, subStmt);
}
}
else if (subquerySqlExpr instanceof org.datanucleus.store.rdbms.sql.expression.SubqueryExpression)
{
SQLStatement subStmt =
((org.datanucleus.store.rdbms.sql.expression.SubqueryExpression)subquerySqlExpr).getSubqueryStatement();
subquerySqlExpr = new BooleanSubqueryExpression(stmt, keyword, subStmt);
}
else if (subquerySqlExpr instanceof NumericSubqueryExpression)
{
// Apply keyword (e.g ALL, SOME, ANY) to numeric expressions
((NumericSubqueryExpression)subquerySqlExpr).setKeyword(keyword);