Annotation Type Audited


  • @Target({TYPE,FIELD})
    @Retention(RUNTIME)
    public @interface Audited
    Whenever an entity or field has this annotation, it indicates that any changes to the entity / field will be published (by the publisher belonging to the PersistenceLayer instance).
    When the entity-level is annotated, it implies that all fields should also be annotated unless overriden by NotAudited on the field.
    • Optional Element Summary

      Optional Elements 
      Modifier and Type Optional Element Description
      java.lang.Class<? extends AuditExtensions> extensions
      NOTE: This attribute is valid for entity-level annotations only, and will be ignored if appearing on fields.
      java.lang.String name  
      AuditTrigger trigger  
    • Element Detail

      • name

        java.lang.String name
        Returns:
        the name to use for the annotated type (entity or field) when audited.
        If empty or missing, will default to the name already defined for this type, as follows:
        • Entity: EntityType.getName()
        • Field: The result of toString() on the field, which retrieves the name by reflection
        Default:
        ""
      • trigger

        AuditTrigger trigger
        Returns:
        the rule by which to trigger auditing for the annotated entity type or field.
        This attribute is valid for field-level annotations only, and will be ignored if appearing on entities.
        For the entity-level,AuditTrigger.ON_CREATE_OR_UPDATE is implied always.
        Default:
        com.kenshoo.pl.entity.audit.AuditTrigger.ON_CREATE_OR_UPDATE
      • extensions

        java.lang.Class<? extends AuditExtensions> extensions
        NOTE: This attribute is valid for entity-level annotations only, and will be ignored if appearing on fields.
        Returns:
        extensions to the basic audit data that will be generated for the annotated entity type.
        This attribute is valid for entity-level annotations only, and will be ignored if appearing on fields.
        See Also:
        AuditExtensions
        Default:
        com.kenshoo.pl.entity.spi.audit.AuditExtensions.EmptyAuditExtensions.class