Annotation Type AttributeAccessor

  • @Target({METHOD,FIELD})
    public @interface AttributeAccessor
    Names a persistent property access strategy (PropertyAccessStrategy) to use.

    Can be specified at either:

    • TYPE level, which will act as the default accessor strategy for all attributes on the class which do not explicitly name an accessor strategy
    • METHOD/FIELD level, which will be in effect for just that attribute.

    Should only be used to name custom PropertyAccessStrategy. For property/field access, the JPA Access annotation should be preferred using the appropriate AccessType. However, if this annotation is used with either value="property" or value="field", it will act just as the corresponding usage of Access.

    See Also:
    PropertyAccessStrategy, PropertyAccessStrategyResolver