/** * Warning: Allowing an unverified SQL string to be passed into this * method makes your application vulnerable to SQL injection attacks. */ public DataModifyQuery(String sqlString) { this(); setSQLString(sqlString); }
/** * Warning: Allowing an unverified SQL string to be passed into this * method makes your application vulnerable to SQL injection attacks. */ public DataModifyQuery(String sqlString) { this(); setSQLString(sqlString); }
/** * Warning: Allowing an unverified SQL string to be passed into this * method makes your application vulnerable to SQL injection attacks. */ public DataModifyQuery(String sqlString) { this(); setSQLString(sqlString); }
protected DataModifyQuery buildUpdateQuery(String seqName, Number size) { DataModifyQuery updateQuery = new DataModifyQuery(); updateQuery.dontBindAllParameters(); String sizeString = size.toString(); StringWriter writer = new StringWriter(updateStringBufferSize + seqName.length() + sizeString.length()); writer.write(updateString1); writer.write(seqName); writer.write(updateString2); writer.write(sizeString); updateQuery.setSQLString(writer.toString()); return updateQuery; }
protected DataModifyQuery buildUpdateQuery(String seqName, Number size) { DataModifyQuery updateQuery = new DataModifyQuery(); updateQuery.dontBindAllParameters(); String sizeString = size.toString(); StringWriter writer = new StringWriter(updateStringBufferSize + seqName.length() + sizeString.length()); writer.write(updateString1); writer.write(seqName); writer.write(updateString2); writer.write(sizeString); updateQuery.setSQLString(writer.toString()); return updateQuery; }
protected DataModifyQuery buildUpdateQuery(String seqName, Number size) { DataModifyQuery updateQuery = new DataModifyQuery(); updateQuery.dontBindAllParameters(); String sizeString = size.toString(); StringWriter writer = new StringWriter(updateStringBufferSize + seqName.length() + sizeString.length()); writer.write(updateString1); writer.write(seqName); writer.write(updateString2); writer.write(sizeString); updateQuery.setSQLString(writer.toString()); return updateQuery; }
/** * PUBLIC: */ public void setAddTargetSQLString(String sqlString) { DataModifyQuery query = new DataModifyQuery(); query.setSQLString(sqlString); setCustomAddTargetQuery(query); }
/** * PUBLIC: */ public void setAddTargetSQLString(String sqlString) { DataModifyQuery query = new DataModifyQuery(); query.setSQLString(sqlString); setCustomAddTargetQuery(query); }
/** * PUBLIC: * Set the receiver's insert SQL string. This allows the user to override the SQL * generated by TopLink, 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 is used to insert an entry into the direct table. * <p>Example, 'insert into RESPONS (EMP_ID, RES_DESC) values (#EMP_ID, #RES_DESC)'. */ public void setInsertSQLString(String sqlString) { DataModifyQuery query = new DataModifyQuery(); query.setSQLString(sqlString); setCustomInsertQuery(query); }
/** * PUBLIC: */ public void setAddTargetSQLString(String sqlString) { DataModifyQuery query = new DataModifyQuery(); query.setSQLString(sqlString); setCustomAddTargetQuery(query); }
/** * PUBLIC: * Set the receiver's delete SQL string. This allows the user to override the SQL * generated by TopLink, 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 SQL is responsible for doing the deletion required by the mapping, * such as deletion from join table for M-M. * Example, 'delete from RESPONS where EMP_ID = #EMP_ID and DESCRIP = #DESCRIP'. */ public void setDeleteSQLString(String sqlString) { DataModifyQuery query = new DataModifyQuery(); query.setSQLString(sqlString); setCustomDeleteQuery(query); }
/** * PUBLIC: * Set the receiver's delete SQL string. This allows the user to override the SQL * generated by TOPLink, 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 is used to delete a single entry from the M-M join table. * Example, 'delete from PROJ_EMP where PROJ_ID = #PROJ_ID AND EMP_ID = #EMP_ID'. */ public void setDeleteSQLString(String sqlString) { DataModifyQuery query = new DataModifyQuery(); query.setSQLString(sqlString); setCustomDeleteQuery(query); }
/** * PUBLIC: * Set the receiver's insert SQL string. This allows the user to override the SQL * generated by TopLink, 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 is used to insert an entry into the direct table. * <p>Example, 'insert into RESPONS (EMP_ID, RES_DESC) values (#EMP_ID, #RES_DESC)'. */ public void setInsertSQLString(String sqlString) { DataModifyQuery query = new DataModifyQuery(); query.setSQLString(sqlString); setCustomInsertQuery(query); }
/** * PUBLIC: * Set the receiver's delete SQL string. This allows the user to override the SQL * generated by TOPLink, 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 is used to delete a single entry from the M-M join table. * Example, 'delete from PROJ_EMP where PROJ_ID = #PROJ_ID AND EMP_ID = #EMP_ID'. */ public void setDeleteSQLString(String sqlString) { DataModifyQuery query = new DataModifyQuery(); query.setSQLString(sqlString); setCustomDeleteQuery(query); }
/** * PUBLIC: * Set the receiver's insert SQL string. This allows the user to override the SQL * generated by TopLink, 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 is used to insert an entry into the direct table. * <p>Example, 'insert into RESPONS (EMP_ID, RES_DESC) values (#EMP_ID, #RES_DESC)'. */ public void setInsertSQLString(String sqlString) { DataModifyQuery query = new DataModifyQuery(); query.setSQLString(sqlString); setCustomInsertQuery(query); }
/** * PUBLIC: * Set the receiver's insert SQL string. This allows the user to override the SQL * generated by TOPLink, 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 is used to insert an entry into the M-M join table. * Example, 'insert into PROJ_EMP (EMP_ID, PROJ_ID) values (#EMP_ID, #PROJ_ID)'. */ public void setInsertSQLString(String sqlString) { DataModifyQuery query = new DataModifyQuery(); query.setSQLString(sqlString); setCustomInsertQuery(query); }
/** * PUBLIC: * Set the receiver's delete all SQL string. This allows the user to override the SQL * generated by TopLink, 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 SQL is responsible for doing the deletion required by the mapping, * such as deletion of all the rows from join table for M-M, or optimized delete all of target objects for 1-M. * Example, 'delete from PROJ_EMP where EMP_ID = #EMP_ID'. */ public void setDeleteAllSQLString(String sqlString) { DataModifyQuery query = new DataModifyQuery(); query.setSQLString(sqlString); setCustomDeleteAllQuery(query); }
/** * PUBLIC: * Set the receiver's delete SQL string. This allows the user to override the SQL * generated by TOPLink, 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 is used to delete a single entry from the M-M join table. * Example, 'delete from PROJ_EMP where PROJ_ID = #PROJ_ID AND EMP_ID = #EMP_ID'. */ public void setDeleteSQLString(String sqlString) { DataModifyQuery query = new DataModifyQuery(); query.setSQLString(sqlString); setCustomDeleteQuery(query); }
/** * PUBLIC: * Set the receiver's insert SQL string. This allows the user to override the SQL * generated by TOPLink, 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 is used to insert an entry into the M-M join table. * Example, 'insert into PROJ_EMP (EMP_ID, PROJ_ID) values (#EMP_ID, #PROJ_ID)'. */ public void setInsertSQLString(String sqlString) { DataModifyQuery query = new DataModifyQuery(); query.setSQLString(sqlString); setCustomInsertQuery(query); }
protected DataModifyQuery buildUpdateQuery() { DataModifyQuery query = new DataModifyQuery(); query.addArgument(getNameFieldName()); query.addArgument("PREALLOC_SIZE"); StringWriter writer = new StringWriter(); writer.write("UPDATE " + getQualifiedTableName()); writer.write(" SET " + getCounterFieldName()); writer.write(" = " + getCounterFieldName()); writer.write(" + #PREALLOC_SIZE"); writer.write(" WHERE " + getNameFieldName() + " = #" + getNameFieldName()); query.setSQLString(writer.toString()); return query; } }