return paramExpr;
}
}
else
{
return new NullLiteral(qs);
}
}
if (parameters.size() < implicitParamNo+1)
{
// Already used up all parameters available
throw new JPOXUserException(LOCALISER.msg("021056", "" + id, "" + implicitParamNo));
}
// Find the next implicit parameter available and assign to this implicit parameter
if (!parameters.containsKey("JPOX_" + implicitParamNo))
{
throw new JPOXUserException(LOCALISER.msg("021056", "" + id, "" + implicitParamNo));
}
Object paramValue = parameters.get("JPOX_" + implicitParamNo);
// Replace the value key with the true name in case its used again
parameters.put(id, paramValue);
parameters.remove("JPOX_" + implicitParamNo);
implicitParamNo++;
if (paramValue != null)
{
if (parentExpr != null && paramValue instanceof String && ((String)paramValue).startsWith("this"))
{
// Subquery with parameter pointing back to a field of the parent query
return getExpressionForSubqueryParentParameter((String)paramValue);
}
else
{
JavaTypeMapping m = srm.getDatastoreAdapter().getMapping(paramValue.getClass(), srm, clr);
ScalarExpression paramExpr = m.newLiteral(qs, paramValue);
paramExpr.setParameterName(id);
return paramExpr;
}
}
else
{
return new NullLiteral(qs);
}
}
else
{
if (executionCompile)
{
throw new JPOXUserException(LOCALISER.msg("021056", "" + id, "" + implicitParamNo));
}
else
{
// We have no value available at precompile so just give it a null for now
return new NullLiteral(qs);
}
}
}