Interface PropertyAccessStrategy


@SPI({USE,IMPLEMENT,SUPPLY}) public interface PropertyAccessStrategy

Creates PropertyAccess instances for persistent attributes using field, JavaBeans-style property, or another access mechanism.

Implement a strategy to provide a custom access mechanism and select it with AttributeAccessor.strategy().

See Also:
  • Method Details

    • buildPropertyAccess

      PropertyAccess buildPropertyAccess(PropertyAccessorService propertyAccessorService, Class<?> containerJavaType, String propertyName, boolean setterRequired)
      Build a PropertyAccess for the indicated property
      Parameters:
      propertyAccessorService - The property accessor service
      containerJavaType - The Java type that contains the property; may be null for non-pojo cases.
      propertyName - The property name
      setterRequired - Whether it is an error if we are unable to find a corresponding setter
      Returns:
      The appropriate PropertyAccess