/**
* Build the sql call from the select statement for selecting the locator
*/
private DatabaseCall buildCallFromSelectStatementForLocator(SQLSelectStatement selectStatement, WriteObjectQuery writeQuery, DatabaseCall dbCall, AbstractSession session) {
DatabaseCall call = selectStatement.buildCall(session);
//the LOB context must be passed into the new call object
call.setContexts(dbCall.getContexts());
//need to explictly define one rwo return, otherwise, TL assumes multiple rows return and confuses the accessor
call.returnOneRow();
//the query object has to be set in order to access to the platform and login objects
call.setQuery(writeQuery);
// prepare it
call.prepare(session);
//finally do the translation
call.translate(writeQuery.getTranslationRow(), writeQuery.getModifyRow(), session);
return call;
}