HHH-5917: improving documentation

This commit is contained in:
Adam Warski 2011-06-29 18:27:35 +02:00
parent 9129cf38ce
commit 33a4694fea
2 changed files with 12 additions and 9 deletions

View File

@ -310,11 +310,10 @@
</para>
<para>
If you'd like to audit properties encapsulated by any subset of your entity's mapped superclasses (which are
not explicitly audited), list desired supertypes in <literal>auditParents</literal> attribute of
<interfacename>@Audited</interfacename> annotation. If any <interfacename>@MappedSuperclass</interfacename>
(or any of it's properties) is marked as <interfacename>@Audited</interfacename>, it's behavior is implicitly
inherited by all audited subclasses.
If you'd like to audit properties of a superclass of an entity, which are not explicitly audited (which
don't have the <literal>@Audited</literal> annotation on any properties or on the class),
you can list the superclasses in the <literal>auditParents</literal> attribute of the
<interfacename>@Audited</interfacename> annotation.
</para>
</section>

View File

@ -47,10 +47,14 @@ public @interface Audited {
RelationTargetAuditMode targetAuditMode() default RelationTargetAuditMode.AUDITED;
/**
* @return Set of superclasses which properties shall be audited. The behavior of listed classes
* is the same as if they had {@link Audited} annotation applied on a type level. The scope of this functionality
* is limited to the context of actually mapped entity and its class hierarchy. If a parent type lists any of
* its parent types using this attribute, all fields encapsulated by marked classes are implicitly audited.
* @return Specifies the superclasses for which properties should be audited, even if the superclasses are not
* annotated with {@link Audited}. Causes all properties of the listed classes to be audited, just as if the
* classes had {@link Audited} annotation applied on the class level.
*
* The scope of this functionality is limited to the class hierarchy of the annotated entity.
*
* If a parent type lists any of its parent types using this attribute, all properties in the specified classes
* will also be audited.
*/
Class[] auditParents() default {};
}