/** * 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); // Locator LOB must not be wrapped (WLS wraps LOBs). call.setIsNativeConnectionRequired(this.isNativeConnectionRequired); //the LOB context must be passed into the new call object call.setContexts(dbCall.getContexts()); //need to explicitly define one row return, otherwise, EL 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; }
/** * 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); // Locator LOB must not be wrapped (WLS wraps LOBs). call.setIsNativeConnectionRequired(this.isNativeConnectionRequired); //the LOB context must be passed into the new call object call.setContexts(dbCall.getContexts()); //need to explicitly define one row return, otherwise, EL 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; }
/** * 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); // Locator LOB must not be wrapped (WLS wraps LOBs). call.setIsNativeConnectionRequired(this.isNativeConnectionRequired); //the LOB context must be passed into the new call object call.setContexts(dbCall.getContexts()); //need to explicitly define one row return, otherwise, EL 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; }
/** * Pre-build configure the SQL call. */ public void prepareSelectOneRow() { if (hasMultipleCalls()) { for (Enumeration callsEnum = getCalls().elements(); callsEnum.hasMoreElements();) { DatabaseCall call = (DatabaseCall)callsEnum.nextElement(); call.returnOneRow(); if (isCallQueryMechanism()) { call.setIsFieldMatchingRequired(true); // Set the fieldsincluding joined and partial fields and compute joined indexes, // this requires and assume that the custom SQL returns the fields in the correct order. call.setFields(((ObjectLevelReadQuery)getQuery()).getSelectionFields()); prepareJoining((ObjectLevelReadQuery)getQuery()); } } } else { getCall().returnOneRow(); if (isCallQueryMechanism()) { DatabaseCall call = getDatabaseCall(); call.setIsFieldMatchingRequired(true); // Set the fieldsincluding joined and partial fields and compute joined indexes, // this requires and assume that the custom SQL returns the fields in the correct order. call.setFields(((ObjectLevelReadQuery)getQuery()).getSelectionFields()); prepareJoining((ObjectLevelReadQuery)getQuery()); } } prepareCall(); }
/** * Pre-build configure the SQL call. */ public void prepareSelectOneRow() { if (hasMultipleCalls()) { for (Enumeration callsEnum = getCalls().elements(); callsEnum.hasMoreElements();) { DatabaseCall call = (DatabaseCall)callsEnum.nextElement(); call.returnOneRow(); if (isCallQueryMechanism()) { call.setIsFieldMatchingRequired(true); // Set the fields including joined and partial fields and compute joined indexes, // this requires and assume that the custom SQL returns the fields in the correct order. call.setFields(((ObjectLevelReadQuery)getQuery()).getSelectionFields()); prepareJoining((ObjectLevelReadQuery)getQuery()); } } } else { getCall().returnOneRow(); if (isCallQueryMechanism()) { DatabaseCall call = getDatabaseCall(); call.setIsFieldMatchingRequired(true); // Set the fields including joined and partial fields and compute joined indexes, // this requires and assume that the custom SQL returns the fields in the correct order. call.setFields(((ObjectLevelReadQuery)getQuery()).getSelectionFields()); prepareJoining((ObjectLevelReadQuery)getQuery()); } } prepareCall(); }
/** * Pre-build configure the SQL call. */ public void prepareSelectOneRow() { if (hasMultipleCalls()) { for (Enumeration callsEnum = getCalls().elements(); callsEnum.hasMoreElements();) { DatabaseCall call = (DatabaseCall)callsEnum.nextElement(); call.returnOneRow(); if (isCallQueryMechanism()) { call.setIsFieldMatchingRequired(true); // Set the fields including joined and partial fields and compute joined indexes, // this requires and assume that the custom SQL returns the fields in the correct order. call.setFields(((ObjectLevelReadQuery)getQuery()).getSelectionFields()); prepareJoining((ObjectLevelReadQuery)getQuery()); } } } else { getCall().returnOneRow(); if (isCallQueryMechanism()) { DatabaseCall call = getDatabaseCall(); call.setIsFieldMatchingRequired(true); // Set the fields including joined and partial fields and compute joined indexes, // this requires and assume that the custom SQL returns the fields in the correct order. call.setFields(((ObjectLevelReadQuery)getQuery()).getSelectionFields()); prepareJoining((ObjectLevelReadQuery)getQuery()); } } prepareCall(); }