/** * Looks up both Spring Data's and JPA's access type definition annotations on the property or type level to determine * the access type to be used. Will consider property-level annotations over type-level ones, favoring the Spring Data * ones over the JPA ones if found on the same level. Returns {@literal null} if no explicit annotation can be found * falling back to the defaults implemented in the super class. * * @return */ @Nullable private Boolean detectPropertyAccess() { org.springframework.data.annotation.AccessType accessType = findAnnotation( org.springframework.data.annotation.AccessType.class); if (accessType != null) { return Type.PROPERTY.equals(accessType.value()); } Access access = findAnnotation(Access.class); if (access != null) { return AccessType.PROPERTY.equals(access.value()); } accessType = findPropertyOrOwnerAnnotation(org.springframework.data.annotation.AccessType.class); if (accessType != null) { return Type.PROPERTY.equals(accessType.value()); } access = findPropertyOrOwnerAnnotation(Access.class); if (access != null) { return AccessType.PROPERTY.equals(access.value()); } return null; }
@Nullable private Boolean detectPropertyAccess() { org.springframework.data.annotation.AccessType accessType = findAnnotation( org.springframework.data.annotation.AccessType.class); if (accessType != null) { return Type.PROPERTY.equals(accessType.value()); } Access access = findAnnotation(Access.class); if (access != null) { return AccessType.PROPERTY.equals(access.value()); } accessType = findPropertyOrOwnerAnnotation( org.springframework.data.annotation.AccessType.class); if (accessType != null) { return Type.PROPERTY.equals(accessType.value()); } access = findPropertyOrOwnerAnnotation(Access.class); if (access != null) { return AccessType.PROPERTY.equals(access.value()); } return null; }
/** * Looks up both Spring Data's and JPA's access type definition annotations on the property or type level to determine * the access type to be used. Will consider property-level annotations over type-level ones, favoring the Spring Data * ones over the JPA ones if found on the same level. Returns {@literal null} if no explicit annotation can be found * falling back to the defaults implemented in the super class. * * @return */ @Nullable private Boolean detectPropertyAccess() { org.springframework.data.annotation.AccessType accessType = findAnnotation( org.springframework.data.annotation.AccessType.class); if (accessType != null) { return Type.PROPERTY.equals(accessType.value()); } Access access = findAnnotation(Access.class); if (access != null) { return AccessType.PROPERTY.equals(access.value()); } accessType = findPropertyOrOwnerAnnotation(org.springframework.data.annotation.AccessType.class); if (accessType != null) { return Type.PROPERTY.equals(accessType.value()); } access = findPropertyOrOwnerAnnotation(Access.class); if (access != null) { return AccessType.PROPERTY.equals(access.value()); } return null; }