Class AnnotatedFieldFinder
java.lang.Object
software.xdev.spring.data.eclipse.store.repository.support.AnnotatedFieldFinder
-
Method Summary
Modifier and TypeMethodDescriptionfindAnnotatedField(Class<?> domainClass, Collection<Class<? extends Annotation>> annotations) Finds any field in a class with specified annotations.findIdField(Class<?> domainClass) Finds any field in a class with an ID-Annotation (IdorId).findVersionField(Class<?> domainClass) Finds any field in a class with an Version-Annotation (VersionorVersion).
-
Method Details
-
findIdField
Finds any field in a class with an ID-Annotation (IdorId). Finds this field recursively in the Hierarchy-tree.- Returns:
- field with ID-Annotation. Is
Optional.empty()if no field was found.
-
findVersionField
Finds any field in a class with an Version-Annotation (VersionorVersion). Finds this field recursively in the Hierarchy-tree.- Returns:
- field with Version-Annotation. Is
Optional.empty()if no field was found.
-
findAnnotatedField
public static Optional<Field> findAnnotatedField(Class<?> domainClass, Collection<Class<? extends Annotation>> annotations) Finds any field in a class with specified annotations. Finds this field recursively in the Hierarchy-tree.- Returns:
- field with annotation. Is
Optional.empty()if no field was found.
-