}
SQLExpression expr = (SQLExpression)args.get(0);
if (expr == null)
{
return new NullLiteral(stmt, null, null, null);
}
if (expr instanceof SQLLiteral)
{
RDBMSStoreManager storeMgr = stmt.getRDBMSManager();
ApiAdapter api = storeMgr.getApiAdapter();
Object id = api.getIdForObject(((SQLLiteral)expr).getValue());
if (id == null)
{
return new NullLiteral(stmt, null, null, null);
}
else
{
JavaTypeMapping m = getMappingForClass(id.getClass());
return new ObjectLiteral(stmt, m, id, null);