org.springframework.jdbc.core.ParameterMapper Java Examples

The following examples show how to use org.springframework.jdbc.core.ParameterMapper. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: StoredProcedure.java    From spring-analysis-note with MIT License 2 votes vote down vote up
/**
 * Execute the stored procedure. Subclasses should define a strongly typed
 * execute method (with a meaningful name) that invokes this method, passing in
 * a ParameterMapper that will populate the input map.  This allows mapping database
 * specific features since the ParameterMapper has access to the Connection object.
 * The execute method is also responsible for extracting typed values from the output map.
 * Subclass execute methods will often take domain objects as arguments and return values.
 * Alternatively, they can return void.
 * @param inParamMapper map of input parameters, keyed by name as in parameter
 * declarations. Output parameters need not (but can) be included in this map.
 * It is legal for map entries to be {@code null}, and this will produce the correct
 * behavior using a NULL argument to the stored procedure.
 * @return map of output params, keyed by name as in parameter declarations.
 * Output parameters will appear here, with their values after the
 * stored procedure has been called.
 */
public Map<String, Object> execute(ParameterMapper inParamMapper) throws DataAccessException {
	checkCompiled();
	return getJdbcTemplate().call(newCallableStatementCreator(inParamMapper), getDeclaredParameters());
}
 
Example #2
Source File: SqlCall.java    From spring-analysis-note with MIT License 2 votes vote down vote up
/**
 * Return a CallableStatementCreator to perform an operation
 * with the parameters returned from this ParameterMapper.
 * @param inParamMapper parametermapper. May not be {@code null}.
 */
protected CallableStatementCreator newCallableStatementCreator(ParameterMapper inParamMapper) {
	Assert.state(this.callableStatementFactory != null, "No CallableStatementFactory available");
	return this.callableStatementFactory.newCallableStatementCreator(inParamMapper);
}
 
Example #3
Source File: StoredProcedure.java    From java-technology-stack with MIT License 2 votes vote down vote up
/**
 * Execute the stored procedure. Subclasses should define a strongly typed
 * execute method (with a meaningful name) that invokes this method, passing in
 * a ParameterMapper that will populate the input map.  This allows mapping database
 * specific features since the ParameterMapper has access to the Connection object.
 * The execute method is also responsible for extracting typed values from the output map.
 * Subclass execute methods will often take domain objects as arguments and return values.
 * Alternatively, they can return void.
 * @param inParamMapper map of input parameters, keyed by name as in parameter
 * declarations. Output parameters need not (but can) be included in this map.
 * It is legal for map entries to be {@code null}, and this will produce the correct
 * behavior using a NULL argument to the stored procedure.
 * @return map of output params, keyed by name as in parameter declarations.
 * Output parameters will appear here, with their values after the
 * stored procedure has been called.
 */
public Map<String, Object> execute(ParameterMapper inParamMapper) throws DataAccessException {
	checkCompiled();
	return getJdbcTemplate().call(newCallableStatementCreator(inParamMapper), getDeclaredParameters());
}
 
Example #4
Source File: SqlCall.java    From java-technology-stack with MIT License 2 votes vote down vote up
/**
 * Return a CallableStatementCreator to perform an operation
 * with the parameters returned from this ParameterMapper.
 * @param inParamMapper parametermapper. May not be {@code null}.
 */
protected CallableStatementCreator newCallableStatementCreator(ParameterMapper inParamMapper) {
	Assert.state(this.callableStatementFactory != null, "No CallableStatementFactory available");
	return this.callableStatementFactory.newCallableStatementCreator(inParamMapper);
}
 
Example #5
Source File: StoredProcedure.java    From lams with GNU General Public License v2.0 2 votes vote down vote up
/**
 * Execute the stored procedure. Subclasses should define a strongly typed
 * execute method (with a meaningful name) that invokes this method, passing in
 * a ParameterMapper that will populate the input map.  This allows mapping database
 * specific features since the ParameterMapper has access to the Connection object.
 * The execute method is also responsible for extracting typed values from the output map.
 * Subclass execute methods will often take domain objects as arguments and return values.
 * Alternatively, they can return void.
 * @param inParamMapper map of input parameters, keyed by name as in parameter
 * declarations. Output parameters need not (but can) be included in this map.
 * It is legal for map entries to be {@code null}, and this will produce the correct
 * behavior using a NULL argument to the stored procedure.
 * @return map of output params, keyed by name as in parameter declarations.
 * Output parameters will appear here, with their values after the
 * stored procedure has been called.
 */
public Map<String, Object> execute(ParameterMapper inParamMapper) throws DataAccessException {
	checkCompiled();
	return getJdbcTemplate().call(newCallableStatementCreator(inParamMapper), getDeclaredParameters());
}
 
Example #6
Source File: SqlCall.java    From lams with GNU General Public License v2.0 2 votes vote down vote up
/**
 * Return a CallableStatementCreator to perform an operation
 * with the parameters returned from this ParameterMapper.
 * @param inParamMapper parametermapper. May not be {@code null}.
 */
protected CallableStatementCreator newCallableStatementCreator(ParameterMapper inParamMapper) {
	return this.callableStatementFactory.newCallableStatementCreator(inParamMapper);
}
 
Example #7
Source File: StoredProcedure.java    From spring4-understanding with Apache License 2.0 2 votes vote down vote up
/**
 * Execute the stored procedure. Subclasses should define a strongly typed
 * execute method (with a meaningful name) that invokes this method, passing in
 * a ParameterMapper that will populate the input map.  This allows mapping database
 * specific features since the ParameterMapper has access to the Connection object.
 * The execute method is also responsible for extracting typed values from the output map.
 * Subclass execute methods will often take domain objects as arguments and return values.
 * Alternatively, they can return void.
 * @param inParamMapper map of input parameters, keyed by name as in parameter
 * declarations. Output parameters need not (but can) be included in this map.
 * It is legal for map entries to be {@code null}, and this will produce the correct
 * behavior using a NULL argument to the stored procedure.
 * @return map of output params, keyed by name as in parameter declarations.
 * Output parameters will appear here, with their values after the
 * stored procedure has been called.
 */
public Map<String, Object> execute(ParameterMapper inParamMapper) throws DataAccessException {
	checkCompiled();
	return getJdbcTemplate().call(newCallableStatementCreator(inParamMapper), getDeclaredParameters());
}
 
Example #8
Source File: SqlCall.java    From spring4-understanding with Apache License 2.0 2 votes vote down vote up
/**
 * Return a CallableStatementCreator to perform an operation
 * with the parameters returned from this ParameterMapper.
 * @param inParamMapper parametermapper. May not be {@code null}.
 */
protected CallableStatementCreator newCallableStatementCreator(ParameterMapper inParamMapper) {
	return this.callableStatementFactory.newCallableStatementCreator(inParamMapper);
}
 
Example #9
Source File: StoredProcedure.java    From effectivejava with Apache License 2.0 2 votes vote down vote up
/**
 * Execute the stored procedure. Subclasses should define a strongly typed
 * execute method (with a meaningful name) that invokes this method, passing in
 * a ParameterMapper that will populate the input map.  This allows mapping database
 * specific features since the ParameterMapper has access to the Connection object.
 * The execute method is also responsible for extracting typed values from the output map.
 * Subclass execute methods will often take domain objects as arguments and return values.
 * Alternatively, they can return void.
 * @param inParamMapper map of input parameters, keyed by name as in parameter
 * declarations. Output parameters need not (but can) be included in this map.
 * It is legal for map entries to be {@code null}, and this will produce the correct
 * behavior using a NULL argument to the stored procedure.
 * @return map of output params, keyed by name as in parameter declarations.
 * Output parameters will appear here, with their values after the
 * stored procedure has been called.
 */
public Map<String, Object> execute(ParameterMapper inParamMapper) throws DataAccessException {
	checkCompiled();
	return getJdbcTemplate().call(newCallableStatementCreator(inParamMapper), getDeclaredParameters());
}
 
Example #10
Source File: SqlCall.java    From effectivejava with Apache License 2.0 2 votes vote down vote up
/**
 * Return a CallableStatementCreator to perform an operation
 * with the parameters returned from this ParameterMapper.
 * @param inParamMapper parametermapper. May not be {@code null}.
 */
protected CallableStatementCreator newCallableStatementCreator(ParameterMapper inParamMapper) {
	return this.callableStatementFactory.newCallableStatementCreator(inParamMapper);
}