select+="when '"+contextId+"' then (select "+selectMap[contextId][0]+" from "+selectMap[contextId][1]+(pRowIdDbField?" where "+selectMap[contextId][2]+" = "+pRowIdDbField:"")+") ";
select+="when '"+contextId+"' then (select "+selectMap[contextId][0]+" from "+selectMap[contextId][1]+""+selectMap[contextId][2]+(pRowIdDbField?" where "+selectMap[contextId][3]+" = "+pRowIdDbField:"")+") ";
}
select+="else 'Not defined in ContextUtils.getNameSql()!'";
returnSqlCondition.begin().andPrepare((selectMap[pContextId][4]?selectMap[pContextId][4]:selectMap[pContextId][1])+"."+selectMap[pContextId][2],pRowId).buildSql("select "+selectMap[pContextId][0]+" from "+selectMap[pContextId][1],"1=2");
{
returnSqlCondition.begin().andPrepare((selectMap[pContextId][6]?selectMap[pContextId][6]:selectMap[pContextId][1])+"."+selectMap[pContextId][3],pRowId).buildSql("select "+selectMap[pContextId][0]+" from "+selectMap[pContextId][1]+""+selectMap[pContextId][2],"1=2");
returncond.buildSql("select "+selectMap[pContextId][2]+", "+selectMap[pContextId][0]+dateColumn+" from "+selectMap[pContextId][1],"1=1");
returncond.buildSql("select "+selectMap[pContextId][3]+", "+selectMap[pContextId][0]+dateColumn+" from "+selectMap[pContextId][1]+""+selectMap[pContextId][2],"1=1");