Annotation Interface Audited.Table
- Enclosing class:
Audited
@Documented
@Target({TYPE,PACKAGE,ANNOTATION_TYPE})
@Retention(RUNTIME)
public static @interface Audited.Table
Specifies the audit log's table mapping for an audited
entity. Placed on the entity class alongside
@Audited to customize the audit table
name, schema, catalog, and column names.
This annotation may also be placed on a subclass entity in a JOINED or TABLE_PER_CLASS hierarchy to override the audit table name, schema, or catalog for that subclass. The subclass inherits auditing from the root entity; the annotation on the subclass only customizes table mapping.
- Since:
- 7.4
-
Field Summary
Fields -
Optional Element Summary
Optional ElementsModifier and TypeOptional ElementDescriptionThe catalog of the audit log table.The name of the column holding the identifier of the changeset in which an audit row was introduced.The name of the column holding the identifier of the changeset which invalidates an audit row when the audit strategy is set toAuditStrategy.VALIDITY.The name of the column holding the modification type, encoded as 0 for creation, 1 for modification, and 2 for deletion.The name of the audit log table.The schema of the audit log table.
-
Field Details
-
DEFAULT_CHANGESET_ID_COLUMN_NAME
- See Also:
-
DEFAULT_MODIFICATION_TYPE_COLUMN_NAME
- See Also:
-
DEFAULT_INVALIDATING_CHANGESET_ID_COLUMN_NAME
- See Also:
-
-
Element Details
-
name
String nameThe name of the audit log table. Defaults to the name of the main table with the suffix_AUD.- Default:
""
-
schema
String schemaThe schema of the audit log table. Defaults to the schema of the main table.- Default:
""
-
catalog
String catalogThe catalog of the audit log table. Defaults to the catalog of the main table.- Default:
""
-
changesetIdColumn
String changesetIdColumnThe name of the column holding the identifier of the changeset in which an audit row was introduced.- See Also:
- Default:
"REV"
-
modificationTypeColumn
String modificationTypeColumnThe name of the column holding the modification type, encoded as 0 for creation, 1 for modification, and 2 for deletion.- See Also:
- Default:
"REVTYPE"
-
invalidatingChangesetIdColumn
String invalidatingChangesetIdColumnThe name of the column holding the identifier of the changeset which invalidates an audit row when the audit strategy is set toAuditStrategy.VALIDITY. When a new audit row is written, the previous row's invalidating changeset id column is updated with the current changeset id, marking it as superseded. Anullvalue indicates the row is current (not yet superseded).- Default:
"REVEND"
-