/** * 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); }
@Override public SimpleJdbcCall withProcedureName(String procedureName) { setProcedureName(procedureName); setFunction(false); return this; }
/** * 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); }
/** * Delegate method that executes the call using the passed-in {@link SqlParameterSource}. * @param parameterSource parameter names and values to be used in call * @return a Map of out parameters */ protected Map<String, Object> doExecute(SqlParameterSource parameterSource) { checkCompiled(); Map<String, Object> params = matchInParameterValuesWithCallParameters(parameterSource); return executeCallInternal(params); }
@Override public SimpleJdbcCall declareParameters(SqlParameter... sqlParameters) { for (SqlParameter sqlParameter : sqlParameters) { if (sqlParameter != null) { addDeclaredParameter(sqlParameter); } } return this; }
@Override public SimpleJdbcCall withoutProcedureColumnMetaDataAccess() { setAccessCallParameterMetaData(false); return this; }
@Override public SimpleJdbcInsert usingGeneratedKeyColumns(String... columnNames) { setGeneratedKeyNames(columnNames); return this; }
/** * Set the names of any generated keys. */ public void setGeneratedKeyNames(String... generatedKeyNames) { checkIfConfigurationModificationIsAllowed(); this.generatedKeyNames = generatedKeyNames; }
@Override public SimpleJdbcInsertOperations withoutTableColumnMetaDataAccess() { setAccessTableColumnMetaData(false); return this; }
@Override @SuppressWarnings("unchecked") public int[] executeBatch(Map<String, ?>... batch) { return doExecuteBatch(batch); }
@Override public SimpleJdbcCall withSchemaName(String schemaName) { setSchemaName(schemaName); return this; }
@Override public SimpleJdbcCall withCatalogName(String catalogName) { setCatalogName(catalogName); return this; }
@Override public SimpleJdbcInsert withSchemaName(String schemaName) { setSchemaName(schemaName); return this; }
@Override public SimpleJdbcInsertOperations includeSynonymsForTableColumnMetaData() { setOverrideIncludeSynonymsDefault(true); return this; }
@Override public SimpleJdbcCall returningResultSet(String parameterName, RowMapper<?> rowMapper) { addDeclaredRowMapper(parameterName, rowMapper); return this; }
/** * 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 * {@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 * {@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); }
/** * Delegate method that executes the call using the passed-in Map of parameters. * @param args a Map of parameter name and values * @return a Map of out parameters */ protected Map<String, Object> doExecute(Map<String, ?> args) { checkCompiled(); Map<String, ?> params = matchInParameterValuesWithCallParameters(args); return executeCallInternal(params); }