Class AnnotatedFieldFinder
java.lang.Object
software.xdev.spring.data.eclipse.store.repository.support.AnnotatedFieldFinder
-
Method Summary
Modifier and TypeMethodDescriptionfindAnnotatedFields(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 (Id,IdorEmbeddedId).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 (Id,IdorEmbeddedId). 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.
-
findAnnotatedFields
public static List<Field> findAnnotatedFields(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:
- fields with annotation.
-