Package org.cxbox.model.core.hbn
Class PropagateAnnotationReader
java.lang.Object
org.cxbox.model.core.hbn.PropagateAnnotationReader
- All Implemented Interfaces:
org.hibernate.annotations.common.reflection.AnnotationReader
public class PropagateAnnotationReader
extends Object
implements org.hibernate.annotations.common.reflection.AnnotationReader
Implementation of AnnotationReader adding parent entity annotations marked
using @PropagateAnnotations, to the annotations of the child entity. Created for the reason
that JPA and Hibernate annotations are not marked as @Inherited and therefore do not apply to
child entities
-
Constructor Summary
ConstructorsConstructorDescriptionPropagateAnnotationReader(org.hibernate.annotations.common.reflection.AnnotationReader delegate, org.hibernate.annotations.common.reflection.MetadataProvider metadataProvider, AnnotatedElement annotatedElement) -
Method Summary
Modifier and TypeMethodDescription<T extends Annotation>
TgetAnnotation(Class<T> annotationType) Returns an annotation of the specified type for an element, taking into account inheritancereturns an array of all element annotations taking into account inheritance<T extends Annotation>
booleanisAnnotationPresent(Class<T> annotationType) returns whether an annotation of the specified type is specified for the element being annotated, considering inheritance
-
Constructor Details
-
PropagateAnnotationReader
public PropagateAnnotationReader(org.hibernate.annotations.common.reflection.AnnotationReader delegate, org.hibernate.annotations.common.reflection.MetadataProvider metadataProvider, AnnotatedElement annotatedElement)
-
-
Method Details
-
getAnnotation
Returns an annotation of the specified type for an element, taking into account inheritance- Specified by:
getAnnotationin interfaceorg.hibernate.annotations.common.reflection.AnnotationReader- Parameters:
annotationType- annotation type- Returns:
- annotation
-
isAnnotationPresent
returns whether an annotation of the specified type is specified for the element being annotated, considering inheritance- Specified by:
isAnnotationPresentin interfaceorg.hibernate.annotations.common.reflection.AnnotationReader- Parameters:
annotationType- annotation type- Returns:
- true/false
-
getAnnotations
returns an array of all element annotations taking into account inheritance- Specified by:
getAnnotationsin interfaceorg.hibernate.annotations.common.reflection.AnnotationReader- Returns:
- array of annotations
-