Package org.hibernate.annotations
Annotation Type AttributeAccessor
-
@Target({METHOD,FIELD}) @Retention(RUNTIME) public @interface AttributeAccessor
Specifies an attribute access strategy 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. Forproperty/fieldaccess, the JPAAccessannotation should be preferred using the appropriateAccessType. However, if this annotation is used with eithervalue="property"orvalue="field", it will act just as the corresponding usage ofAccess.
-
-
Optional Element Summary
Optional Elements Modifier and Type Optional Element Description Class<? extends PropertyAccessStrategy>strategyA class implementingPropertyAccessStrategy.StringvalueDeprecated.usestrategy()
-
-
-
Element Detail
-
value
@Deprecated(since="6.0") String value
Deprecated.usestrategy()Names thePropertyAccessStrategystrategy.- Default:
- ""
-
-
-
strategy
Class<? extends PropertyAccessStrategy> strategy
A class implementingPropertyAccessStrategy.- Default:
- org.hibernate.property.access.spi.PropertyAccessStrategy.class
-
-