spring-framework / org.springframework.beans / PropertyAccessor / setPropertyValues

setPropertyValues

abstract fun setPropertyValues(map: MutableMap<*, *>): Unit

Perform a batch update from a Map.

Bulk updates from PropertyValues are more powerful: This method is provided for convenience. Behavior will be identical to that of the #setPropertyValues(PropertyValues) method.

Parameters

map - Map to take properties from. Contains property value objects, keyed by property name

Exceptions

InvalidPropertyException - if there is no such property or if the property isn't writable

PropertyBatchUpdateException - if one or more PropertyAccessExceptions occurred for specific properties during the batch update. This exception bundles all individual PropertyAccessExceptions. All other properties will have been successfully updated.

abstract fun setPropertyValues(pvs: PropertyValues): Unit

The preferred way to perform a batch update.

Note that performing a batch update differs from performing a single update, in that an implementation of this class will continue to update properties if a recoverable error (such as a type mismatch, but not an invalid field name or the like) is encountered, throwing a PropertyBatchUpdateException containing all the individual errors. This exception can be examined later to see all binding errors. Properties that were successfully updated remain changed.

Does not allow unknown fields or invalid fields.

Parameters

pvs - PropertyValues to set on the target object

Exceptions

InvalidPropertyException - if there is no such property or if the property isn't writable

PropertyBatchUpdateException - if one or more PropertyAccessExceptions occurred for specific properties during the batch update. This exception bundles all individual PropertyAccessExceptions. All other properties will have been successfully updated.

See Also
#setPropertyValues(PropertyValues, boolean, boolean)

abstract fun setPropertyValues(pvs: PropertyValues, ignoreUnknown: Boolean): Unit

Perform a batch update with more control over behavior.

Note that performing a batch update differs from performing a single update, in that an implementation of this class will continue to update properties if a recoverable error (such as a type mismatch, but not an invalid field name or the like) is encountered, throwing a PropertyBatchUpdateException containing all the individual errors. This exception can be examined later to see all binding errors. Properties that were successfully updated remain changed.

Parameters

pvs - PropertyValues to set on the target object

ignoreUnknown - should we ignore unknown properties (not found in the bean)

Exceptions

InvalidPropertyException - if there is no such property or if the property isn't writable

PropertyBatchUpdateException - if one or more PropertyAccessExceptions occurred for specific properties during the batch update. This exception bundles all individual PropertyAccessExceptions. All other properties will have been successfully updated.

See Also
#setPropertyValues(PropertyValues, boolean, boolean)

abstract fun setPropertyValues(pvs: PropertyValues, ignoreUnknown: Boolean, ignoreInvalid: Boolean): Unit

Perform a batch update with full control over behavior.

Note that performing a batch update differs from performing a single update, in that an implementation of this class will continue to update properties if a recoverable error (such as a type mismatch, but not an invalid field name or the like) is encountered, throwing a PropertyBatchUpdateException containing all the individual errors. This exception can be examined later to see all binding errors. Properties that were successfully updated remain changed.

Parameters

pvs - PropertyValues to set on the target object

ignoreUnknown - should we ignore unknown properties (not found in the bean)

ignoreInvalid - should we ignore invalid properties (found but not accessible)

Exceptions

InvalidPropertyException - if there is no such property or if the property isn't writable

PropertyBatchUpdateException - if one or more PropertyAccessExceptions occurred for specific properties during the batch update. This exception bundles all individual PropertyAccessExceptions. All other properties will have been successfully updated.