/** * PUBLIC: Return true if this query uses an SQL query mechanism . */ public boolean isSQLCallQuery() { // BUG#2669342 CallQueryMechanism and isCallQueryMechanism have // different meaning as SDK return true but isn't. Call call = getDatasourceCall(); return (call != null) && (call instanceof SQLCall); }
/** * PUBLIC: * Return true if this query uses an SQL query mechanism . */ public boolean isSQLCallQuery() { // BUG#2669342 CallQueryMechanism and isCallQueryMechanism have different meaning as SDK return true but isn't. Call call = getDatasourceCall(); return (call != null) && (call instanceof SQLCall); }
/** * Do not prepare dynamic queries, as the translation row is required. */ @Override public boolean shouldPrepare(DatabaseQuery query) { return (query.getDatasourceCall() instanceof EISInteraction); }
/** * PUBLIC: * Return true if this query uses an JPQL query mechanism . */ public boolean isJPQLCallQuery() { Call call = getDatasourceCall(); return (call != null) && (call instanceof JPQLCall); }
/** * PUBLIC: Return true if this query uses an SQL query mechanism . */ public boolean isSQLCallQuery() { // BUG#2669342 CallQueryMechanism and isCallQueryMechanism have // different meaning as SDK return true but isn't. Call call = getDatasourceCall(); return (call != null) && (call instanceof SQLCall); }
/** * OBSOLETE: Return the call for this query. This call contains the SQL and * argument list. * * @see #getDatasourceCall() */ public DatabaseCall getCall() { Call call = getDatasourceCall(); if (call instanceof DatabaseCall) { return (DatabaseCall) call; } else { return null; } }
/** * OBSOLETE: Return the call for this query. This call contains the SQL and * argument list. * * @see #getDatasourceCall() */ public DatabaseCall getCall() { Call call = getDatasourceCall(); if (call instanceof DatabaseCall) { return (DatabaseCall) call; } else { return null; } }
/** * OBSOLETE: * Return the call for this query. * This call contains the SQL and argument list. * @see #getDatasourceCall() */ public DatabaseCall getCall() { Call call = getDatasourceCall(); if (call instanceof DatabaseCall) { return (DatabaseCall)call; } else { return null; } }
/** * ADVANCED: * Return the SQL string of the query. * This can be used for SQL queries. * This can also be used for normal queries if they have been prepared, (i.e. query.prepareCall()). * @see #prepareCall(Session, Record) */ public String getSQLString() { Call call = getDatasourceCall(); if (call == null) { return null; } if (!(call instanceof SQLCall)) { return null; } return ((SQLCall)call).getSQLString(); }
/** * ADVANCED: Return the SQL string of the query. This can be used for SQL * queries. This can also be used for normal queries if they have been * prepared, (i.e. query.prepareCall()). * * @see #prepareCall(org.eclipse.persistence.sessions.Session, org.eclipse.persistence.sessions.Record) prepareCall(Session, Record) */ public String getSQLString() { Call call = getDatasourceCall(); if (call == null) { return null; } if (!(call instanceof SQLCall)) { return null; } return ((SQLCall) call).getSQLString(); }
/** * ADVANCED: Return the SQL string of the query. This can be used for SQL * queries. This can also be used for normal queries if they have been * prepared, (i.e. query.prepareCall()). * * @see #prepareCall(org.eclipse.persistence.sessions.Session, org.eclipse.persistence.sessions.Record) prepareCall(Session, Record) */ public String getSQLString() { Call call = getDatasourceCall(); if (call == null) { return null; } if (!(call instanceof SQLCall)) { return null; } return ((SQLCall) call).getSQLString(); }
/** * INTERNAL: * Change the internal query to data modify query. */ protected void setAsDataModifyQuery() { DataModifyQuery query = new DataModifyQuery(); query.setIsUserDefined(this.databaseQuery.isUserDefined()); // By default, do not batch user native queries, as row count must be returned. query.setIsBatchExecutionSupported(false); query.copyFromQuery(this.databaseQuery); // Need to clone call, in case was executed as read. query.setDatasourceCall((Call) this.databaseQuery.getDatasourceCall().clone()); this.databaseQuery = query; }
DatasourceCall dsCall = (DatasourceCall) jpaQuery.getDatabaseQuery().getDatasourceCall(); for (Object obj : dsCall.getParameters()) { if (obj instanceof OutputParameterForCallableStatement) {
DatasourceCall dsCall = (DatasourceCall) jpaQuery.getDatabaseQuery().getDatasourceCall(); for (Object obj : dsCall.getParameters()) { if (obj instanceof OutputParameterForCallableStatement) {
} else if (query.getEJBQLString() != null) { method.addLine(queryIdentifier + ".setEJBQLString(\"" + constructValidSQLorEJBQLLinesForJavaSource(query.getEJBQLString()) + "\");"); } else if (query.getDatasourceCall() instanceof XMLInteraction) { addXMLInteractionLines(method, (XMLInteraction)query.getDatasourceCall(), queryIdentifier + "Call"); method.addLine(queryIdentifier + ".setCall(" + queryIdentifier + "Call" + ");");
} else if (query.getEJBQLString() != null) { method.addLine(queryIdentifier + ".setEJBQLString(\"" + constructValidSQLorEJBQLLinesForJavaSource(query.getEJBQLString()) + "\");"); } else if (query.getDatasourceCall() instanceof XMLInteraction) { addXMLInteractionLines(method, (XMLInteraction)query.getDatasourceCall(), queryIdentifier + "Call"); method.addLine(queryIdentifier + ".setCall(" + queryIdentifier + "Call" + ");");
} else if (query.getEJBQLString() != null) { method.addLine(queryIdentifier + ".setEJBQLString(\"" + constructValidSQLorEJBQLLinesForJavaSource(query.getEJBQLString()) + "\");"); } else if (query.getDatasourceCall() instanceof XMLInteraction) { addXMLInteractionLines(method, (XMLInteraction)query.getDatasourceCall(), queryIdentifier + "Call"); method.addLine(queryIdentifier + ".setCall(" + queryIdentifier + "Call" + ");");