Class SimplePropertySqlParameterSource

java.lang.Object
org.springframework.jdbc.core.namedparam.AbstractSqlParameterSource
org.springframework.jdbc.core.namedparam.SimplePropertySqlParameterSource
All Implemented Interfaces:
SqlParameterSource

public class SimplePropertySqlParameterSource extends AbstractSqlParameterSource
SqlParameterSource implementation that obtains parameter values from bean properties of a given JavaBean object, from component accessors of a record class, or from raw field access.

This is a more flexible variant of BeanPropertySqlParameterSource, with the limitation that it is not able to enumerate its parameter names.

In terms of its fallback property discovery algorithm, this class is similar to SimpleErrors which is also just used for property retrieval purposes (rather than binding).

Since:
6.1
Author:
Juergen Hoeller
See Also:
  • Constructor Details

    • SimplePropertySqlParameterSource

      public SimplePropertySqlParameterSource(Object paramObject)
      Create a new SqlParameterSource for the given bean, record or field holder.
      Parameters:
      paramObject - the bean, record or field holder instance to wrap
  • Method Details