/** * Delegate method that executes a batch insert using the passed-in {@link SqlParameterSource SqlParameterSources}. * @param batch array of SqlParameterSource with parameter names and values to be used in insert * @return array of number of rows affected */ protected int[] doExecuteBatch(SqlParameterSource... batch) { checkCompiled(); List<List<Object>> batchValues = new ArrayList<>(batch.length); for (SqlParameterSource parameterSource : batch) { batchValues.add(matchInParameterValuesWithInsertColumns(parameterSource)); } return executeBatchInternal(batchValues); }
/** * Delegate method that executes a batch insert using the passed-in Maps of parameters. * @param batch array of Maps with parameter names and values to be used in batch insert * @return array of number of rows affected */ @SuppressWarnings("unchecked") protected int[] doExecuteBatch(Map<String, ?>... batch) { checkCompiled(); List<List<Object>> batchValues = new ArrayList<>(batch.length); for (Map<String, ?> args : batch) { batchValues.add(matchInParameterValuesWithInsertColumns(args)); } return executeBatchInternal(batchValues); }
/** * Delegate method that executes the insert using the passed-in Map of parameters. * @param args a Map with parameter names and values to be used in insert * @return the number of rows affected */ protected int doExecute(Map<String, ?> args) { checkCompiled(); List<Object> values = matchInParameterValuesWithInsertColumns(args); return executeInsertInternal(values); }
/** * Method that provides execution of the insert using the passed-in * Map of parameters and returning a generated key. * @param args a Map with parameter names and values to be used in insert * @return the key generated by the insert */ protected Number doExecuteAndReturnKey(Map<String, ?> args) { checkCompiled(); List<Object> values = matchInParameterValuesWithInsertColumns(args); return executeInsertAndReturnKeyInternal(values); }
/** * Method that provides execution of the insert using the passed-in * {@link SqlParameterSource} and returning a generated key. * @param parameterSource parameter names and values to be used in insert * @return the key generated by the insert */ protected Number doExecuteAndReturnKey(SqlParameterSource parameterSource) { checkCompiled(); List<Object> values = matchInParameterValuesWithInsertColumns(parameterSource); return executeInsertAndReturnKeyInternal(values); }
/** * Method that provides execution of the insert using the passed-in * {@link SqlParameterSource} and returning all generated keys. * @param parameterSource parameter names and values to be used in insert * @return the KeyHolder containing keys generated by the insert */ protected KeyHolder doExecuteAndReturnKeyHolder(SqlParameterSource parameterSource) { checkCompiled(); List<Object> values = matchInParameterValuesWithInsertColumns(parameterSource); return executeInsertAndReturnKeyHolderInternal(values); }
/** * Delegate method that executes the insert using the passed-in {@link SqlParameterSource}. * @param parameterSource parameter names and values to be used in insert * @return the number of rows affected */ protected int doExecute(SqlParameterSource parameterSource) { checkCompiled(); List<Object> values = matchInParameterValuesWithInsertColumns(parameterSource); return executeInsertInternal(values); }
/** * Method that provides execution of the insert using the passed-in * Map of parameters and returning all generated keys. * @param args a Map with parameter names and values to be used in insert * @return the KeyHolder containing keys generated by the insert */ protected KeyHolder doExecuteAndReturnKeyHolder(Map<String, ?> args) { checkCompiled(); List<Object> values = matchInParameterValuesWithInsertColumns(args); return executeInsertAndReturnKeyHolderInternal(values); }
/** * Delegate method that executes a batch insert using the passed-in {@link SqlParameterSource SqlParameterSources}. * @param batch array of SqlParameterSource with parameter names and values to be used in insert * @return array of number of rows affected */ protected int[] doExecuteBatch(SqlParameterSource... batch) { checkCompiled(); List<List<Object>> batchValues = new ArrayList<>(batch.length); for (SqlParameterSource parameterSource : batch) { batchValues.add(matchInParameterValuesWithInsertColumns(parameterSource)); } return executeBatchInternal(batchValues); }
/** * Method that provides execution of the insert using the passed in {@link SqlParameterSource} * @param parameterSource parameter names and values to be used in insert * @return number of rows affected */ protected int doExecute(SqlParameterSource parameterSource) { checkCompiled(); List<Object> values = matchInParameterValuesWithInsertColumns(parameterSource); return executeInsertInternal(values); }
/** * Method that provides execution of the insert using the passed-in * {@link SqlParameterSource} and returning all generated keys. * @param parameterSource parameter names and values to be used in insert * @return the KeyHolder containing keys generated by the insert */ protected KeyHolder doExecuteAndReturnKeyHolder(SqlParameterSource parameterSource) { checkCompiled(); List<Object> values = matchInParameterValuesWithInsertColumns(parameterSource); return executeInsertAndReturnKeyHolderInternal(values); }
/** * Method that provides execution of the insert using the passed in Map of parameters * @param args Map with parameter names and values to be used in insert * @return number of rows affected */ protected int doExecute(Map<String, Object> args) { checkCompiled(); List<Object> values = matchInParameterValuesWithInsertColumns(args); return executeInsertInternal(values); }
/** * Method that provides execution of the insert using the passed in Map of parameters * and returning a generated key * * @param args Map with parameter names and values to be used in insert * @return the key generated by the insert */ protected Number doExecuteAndReturnKey(Map<String, Object> args) { checkCompiled(); List<Object> values = matchInParameterValuesWithInsertColumns(args); return executeInsertAndReturnKeyInternal(values); }
/** * Method that provides execution of the insert using the passed in {@link SqlParameterSource} * and returning a generated key * * @param parameterSource parameter names and values to be used in insert * @return the key generated by the insert */ protected Number doExecuteAndReturnKey(SqlParameterSource parameterSource) { checkCompiled(); List<Object> values = matchInParameterValuesWithInsertColumns(parameterSource); return executeInsertAndReturnKeyInternal(values); }
/** * Method that provides execution of the insert using the passed in Map of parameters * and returning all generated keys * * @param args Map with parameter names and values to be used in insert * @return the KeyHolder containing keys generated by the insert */ protected KeyHolder doExecuteAndReturnKeyHolder(Map<String, Object> args) { checkCompiled(); List<Object> values = matchInParameterValuesWithInsertColumns(args); return executeInsertAndReturnKeyHolderInternal(values); }
/** * Method that provides execution of the insert using the passed in {@link SqlParameterSource} * and returning all generated keys * * @param parameterSource parameter names and values to be used in insert * @return the KeyHolder containing keys generated by the insert */ protected KeyHolder doExecuteAndReturnKeyHolder(SqlParameterSource parameterSource) { checkCompiled(); List<Object> values = matchInParameterValuesWithInsertColumns(parameterSource); return executeInsertAndReturnKeyHolderInternal(values); }
/** * Delegate method that executes the insert using the passed-in {@link SqlParameterSource}. * @param parameterSource parameter names and values to be used in insert * @return the number of rows affected */ protected int doExecute(SqlParameterSource parameterSource) { checkCompiled(); List<Object> values = matchInParameterValuesWithInsertColumns(parameterSource); return executeInsertInternal(values); }
/** * Method that provides execution of the insert using the passed-in * {@link SqlParameterSource} and returning a generated key. * @param parameterSource parameter names and values to be used in insert * @return the key generated by the insert */ protected Number doExecuteAndReturnKey(SqlParameterSource parameterSource) { checkCompiled(); List<Object> values = matchInParameterValuesWithInsertColumns(parameterSource); return executeInsertAndReturnKeyInternal(values); }
/** * Method that provides execution of a batch insert using the passed in Maps of parameters. * @param batch array of Maps with parameter names and values to be used in batch insert * @return array of number of rows affected */ @SuppressWarnings("unchecked") protected int[] doExecuteBatch(Map<String, Object>[] batch) { checkCompiled(); List<Object>[] batchValues = new ArrayList[batch.length]; int i = 0; for (Map<String, Object> args : batch) { List<Object> values = matchInParameterValuesWithInsertColumns(args); batchValues[i++] = values; } return executeBatchInternal(batchValues); }
/** * Method that provides execution of a batch insert using the passed in array of {@link SqlParameterSource} * @param batch array of SqlParameterSource with parameter names and values to be used in insert * @return array of number of rows affected */ @SuppressWarnings("unchecked") protected int[] doExecuteBatch(SqlParameterSource[] batch) { checkCompiled(); List<Object>[] batchValues = new ArrayList[batch.length]; int i = 0; for (SqlParameterSource parameterSource : batch) { List<Object> values = matchInParameterValuesWithInsertColumns(parameterSource); batchValues[i++] = values; } return executeBatchInternal(batchValues); }