/** * INTERNAL: * Return the query string (SQL) of the call. */ public String getQueryString() { return getSQLString(); }
/** * INTERNAL: * Return the SQL string for the call. */ public String getCallString() { return getSQLString(); }
/** * INTERNAL: * Return the query string (SQL) of the call. */ public String getQueryString() { return getSQLString(); }
/** * INTERNAL: * Return the SQL string for the call. */ public String getCallString() { return getSQLString(); }
/** * INTERNAL: * Return the SQL string for the call. */ public String getCallString() { return getSQLString(); }
/** * INTERNAL: * Return the query string (SQL) of the call. */ public String getQueryString() { return getSQLString(); }
/** * INTERNAL: * Print the SQL string. */ public String toString() { String str = Helper.getShortClassName(getClass()); if (getSQLString() == null) { return str; } else { return str + "(" + getSQLString() + ")"; } }
/** * INTERNAL: * Print the SQL string. */ public String toString() { String str = Helper.getShortClassName(getClass()); if (getSQLString() == null) { return str; } else { return str + "(" + getSQLString() + ")"; } }
/** * INTERNAL: * Print the SQL string. */ public String toString() { String str = Helper.getShortClassName(getClass()); if (getSQLString() == null) { return str; } else { return str + "(" + getSQLString() + ")"; } }
/** * Try to print the SQL. */ public String toString() { StringWriter writer = new StringWriter(); writer.write(Helper.getShortClassName(getClass())); writer.write("("); try { DatabaseCall call = buildCall(new DatabaseSessionImpl(new org.eclipse.persistence.sessions.DatabaseLogin())); writer.write(call.getSQLString()); } catch (Exception exception) { } writer.write(")"); return writer.toString(); } }
/** * Try to print the SQL. */ public String toString() { StringWriter writer = new StringWriter(); writer.write(Helper.getShortClassName(getClass())); writer.write("("); try { DatabaseCall call = buildCall(new DatabaseSessionImpl(new org.eclipse.persistence.sessions.DatabaseLogin())); writer.write(call.getSQLString()); } catch (Exception exception) { } writer.write(")"); return writer.toString(); } }
/** * Try to print the SQL. */ public String toString() { StringWriter writer = new StringWriter(); writer.write(Helper.getShortClassName(getClass())); writer.write("("); try { DatabaseCall call = buildCall(new DatabaseSessionImpl(new org.eclipse.persistence.sessions.DatabaseLogin())); writer.write(call.getSQLString()); } catch (Exception exception) { } writer.write(")"); return writer.toString(); } }
/** * Return the SQL string for logging purposes. */ public String getLogString(Accessor accessor) { if (hasParameters()) { StringWriter writer = new StringWriter(); writer.write(getSQLString()); writer.write(Helper.cr()); if (hasParameters()) { AbstractSession session = null; if (getQuery() != null) { session = getQuery().getSession(); } appendLogParameters(getParameters(), accessor, writer, session); } return writer.toString(); } else { return getSQLString(); } }
/** * Return the SQL string for logging purposes. */ public String getLogString(Accessor accessor) { if (hasParameters()) { StringWriter writer = new StringWriter(); writer.write(getSQLString()); writer.write(Helper.cr()); if (hasParameters()) { AbstractSession session = null; if (getQuery() != null) { session = getQuery().getSession(); } appendLogParameters(getParameters(), accessor, writer, session); } return writer.toString(); } else { return getSQLString(); } }
/** * Return the SQL string for logging purposes. */ public String getLogString(Accessor accessor) { if (hasParameters()) { StringWriter writer = new StringWriter(); writer.write(getSQLString()); writer.write(Helper.cr()); if (hasParameters()) { AbstractSession session = null; if (getQuery() != null) { session = getQuery().getSession(); } appendLogParameters(getParameters(), accessor, writer, session); } return writer.toString(); } else { return getSQLString(); } }
/** * Execute the statement. */ public boolean execute(DatabaseCall call, Statement statement, AbstractSession session) throws SQLException { boolean result; session.startOperationProfile(SessionProfiler.StatementExecute, call.getQuery(), SessionProfiler.ALL); try { if (call.isDynamicCall(session)) { result = statement.execute(call.getSQLString()); } else { result = ((PreparedStatement)statement).execute(); } } finally { session.endOperationProfile(SessionProfiler.StatementExecute, call.getQuery(), SessionProfiler.ALL); } return result; }
/** * Execute the statement. */ public boolean execute(DatabaseCall call, Statement statement, AbstractSession session) throws SQLException { boolean result; session.startOperationProfile(SessionProfiler.StatementExecute, call.getQuery(), SessionProfiler.ALL); try { if (call.isDynamicCall(session)) { result = statement.execute(call.getSQLString()); } else { result = ((PreparedStatement)statement).execute(); } } finally { session.endOperationProfile(SessionProfiler.StatementExecute, call.getQuery(), SessionProfiler.ALL); } return result; }
/** * Execute the statement. */ public ResultSet executeSelect(DatabaseCall call, Statement statement, AbstractSession session) throws SQLException { ResultSet resultSet; session.startOperationProfile(SessionProfiler.STATEMENT_EXECUTE, call.getQuery(), SessionProfiler.ALL); try { if (call.isDynamicCall(session)) { resultSet = statement.executeQuery(call.getSQLString()); } else { resultSet = ((PreparedStatement)statement).executeQuery(); } } finally { session.endOperationProfile(SessionProfiler.STATEMENT_EXECUTE, call.getQuery(), SessionProfiler.ALL); } // Allow for procs with outputs to be raised as events for error handling. if (call.shouldBuildOutputRow()) { AbstractRecord outputRow = buildOutputRow((CallableStatement)statement, call, session); call.getQuery().setProperty("output", outputRow); if (session.hasEventManager()) { session.getEventManager().outputParametersDetected(outputRow, call); } } return resultSet; }
/** * Execute the statement. */ public ResultSet executeSelect(DatabaseCall call, Statement statement, AbstractSession session) throws SQLException { ResultSet resultSet; session.startOperationProfile(SessionProfiler.StatementExecute, call.getQuery(), SessionProfiler.ALL); try { if (call.isDynamicCall(session)) { resultSet = statement.executeQuery(call.getSQLString()); } else { resultSet = ((PreparedStatement)statement).executeQuery(); } } finally { session.endOperationProfile(SessionProfiler.StatementExecute, call.getQuery(), SessionProfiler.ALL); } // Allow for procs with outputs to be raised as events for error handling. if (call.shouldBuildOutputRow() && getPlatform().isOutputAllowWithResultSet()) { AbstractRecord outputRow = buildOutputRow((CallableStatement)statement, call, session); call.getQuery().setProperty("output", outputRow); if (session.hasEventManager()) { session.getEventManager().outputParametersDetected(outputRow, call); } } return resultSet; }
/** * Execute the statement. */ public ResultSet executeSelect(DatabaseCall call, Statement statement, AbstractSession session) throws SQLException { ResultSet resultSet; session.startOperationProfile(SessionProfiler.StatementExecute, call.getQuery(), SessionProfiler.ALL); try { if (call.isDynamicCall(session)) { resultSet = statement.executeQuery(call.getSQLString()); } else { resultSet = ((PreparedStatement)statement).executeQuery(); } } finally { session.endOperationProfile(SessionProfiler.StatementExecute, call.getQuery(), SessionProfiler.ALL); } // Allow for procs with outputs to be raised as events for error handling. if (call.shouldBuildOutputRow() && getPlatform().isOutputAllowWithResultSet()) { AbstractRecord outputRow = buildOutputRow((CallableStatement)statement, call, session); call.getQuery().setProperty("output", outputRow); if (session.hasEventManager()) { session.getEventManager().outputParametersDetected(outputRow, call); } } return resultSet; }