Example usage for org.springframework.jdbc.core.namedparam BeanPropertySqlParameterSource getValue

List of usage examples for org.springframework.jdbc.core.namedparam BeanPropertySqlParameterSource getValue

Introduction

In this page you can find the example usage for org.springframework.jdbc.core.namedparam BeanPropertySqlParameterSource getValue.

Prototype

@Override
    @Nullable
    public Object getValue(String paramName) throws IllegalArgumentException 

Source Link

Usage

From source file:com.stehno.sjdbcx.reflection.DefaultParamMapper.java

private void addBean(final MapSqlParameterSource source, final Object beanObj) {
    final BeanPropertySqlParameterSource beanSource = new BeanPropertySqlParameterSource(beanObj);

    for (final String name : beanSource.getReadablePropertyNames()) {
        source.addValue(name, beanSource.getValue(name));
    }//from  w  ww  . j  a  v  a2 s.c  o  m
}