/** * ADVANCED: * Set the receiver's update SQL string. * This allows the user to override the SQL generated by EclipseLink, with there own SQL or procedure call. * The arguments are translated from the fields of the source row, * through replacing the field names marked by '#' with the values for those fields. * This must check the optimistic lock field and raise an error on optimistic lock failure. * Warning: Allowing an unverified SQL string to be passed into this * method makes your application vulnerable to SQL injection attacks. * <p> * Example, "update EMPLOYEE set F_NAME to #F_NAME, L_NAME to #L_NAME where EMPLOYEE_ID = #EMPLOYEE_ID". */ public void setUpdateSQLString(String sqlString) { if (sqlString == null) { return; } UpdateObjectQuery query = new UpdateObjectQuery(); query.setSQLString(sqlString); setUpdateQuery(query); }
/** * ADVANCED: * Set the receiver's update SQL string. * This allows the user to override the SQL generated by EclipseLink, with there own SQL or procedure call. * The arguments are translated from the fields of the source row, * through replacing the field names marked by '#' with the values for those fields. * This must check the optimistic lock field and raise an error on optimistic lock failure. * Warning: Allowing an unverified SQL string to be passed into this * method makes your application vulnerable to SQL injection attacks. * <p> * Example, "update EMPLOYEE set F_NAME to #F_NAME, L_NAME to #L_NAME where EMPLOYEE_ID = #EMPLOYEE_ID". */ public void setUpdateSQLString(String sqlString) { if (sqlString == null) { return; } UpdateObjectQuery query = new UpdateObjectQuery(); query.setSQLString(sqlString); setUpdateQuery(query); }
/** * ADVANCED: * Set the receiver's update SQL string. * This allows the user to override the SQL generated by EclipseLink, with there own SQL or procedure call. * The arguments are translated from the fields of the source row, * through replacing the field names marked by '#' with the values for those fields. * This must check the optimistic lock field and raise an error on optimistic lock failure. * Warning: Allowing an unverified SQL string to be passed into this * method makes your application vulnerable to SQL injection attacks. * <p> * Example, "update EMPLOYEE set F_NAME to #F_NAME, L_NAME to #L_NAME where EMPLOYEE_ID = #EMPLOYEE_ID". */ public void setUpdateSQLString(String sqlString) { if (sqlString == null) { return; } UpdateObjectQuery query = new UpdateObjectQuery(); query.setSQLString(sqlString); setUpdateQuery(query); }