MappedSuperClass annotation
If an abstract class inherits from an abstract superclass annotated with
@MappedSuperclass, it inherits the annotation too or if I want both
annotated I have to replicate the annotation?
Ex:
@MappedSuperclass
public abstract Class1 {
...
}
@MappedSuperclass <-- I have to declare it or it's implicit?
public abstract Class2 extends Class1{
...
}
.
Relevant Pages
- Re: MappedSuperClass annotation
... @MappedSuperclass, it inherits the annotation too or if I want both ... I have to replicate the annotation? ... annotations to decide if they want to climb up the inheritance or not. ... _classes_ where the annotation has the @Inherited meta-annotation. ... (comp.lang.java.help) - Re: MappedSuperClass annotation
... @MappedSuperclass, it inherits the annotation too or if I want both annotated ... I have to replicate the annotation? ... public abstract Class2 extends Class1{ ... (comp.lang.java.help) - Re: abstract static methods (again)
... Strictly speaking there's no need to specify the processor path if doing this; it will default to the user classpath if no processor path is specified. ... Because of the @Inherited annotation on the @NoArgsConstructor annotation it becomes particularly handy. ... I have found use of this approach when a large number of JPA @Entity classes inherit from a @MappedSuperclass - it's not uncommon to want to supply some entities with useful ctors; using this kind of annotation on the @MappedSuperclass catches all these problems at compile time. ... (comp.lang.java.programmer) - Re: MappedSuperClass annotation
... @MappedSuperclass, it inherits the annotation too or if I want both ... I have to replicate the annotation? ... public abstract Class2 extends Class1{ ... decide if they want to climb up the inheritance or not. ... (comp.lang.java.help) - Re: MappedSuperClass annotation
... @MappedSuperclass, it inherits the annotation too or if I want both ... I have to replicate the annotation? ... decide if they want to climb up the inheritance or not. ... (comp.lang.java.help) |
|