-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
#2349 Introduce AbstractAuditModProp to represent properties modified…
… in an audit event
- Loading branch information
1 parent
5cea9d1
commit 7a6bcb9
Showing
2 changed files
with
43 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
34 changes: 34 additions & 0 deletions
34
platform-pojo-bl/src/main/java/ua/com/fielden/platform/audit/AbstractAuditModProp.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
package ua.com.fielden.platform.audit; | ||
|
||
import ua.com.fielden.platform.entity.AbstractEntity; | ||
import ua.com.fielden.platform.entity.DynamicEntityKey; | ||
import ua.com.fielden.platform.entity.annotation.KeyType; | ||
import ua.com.fielden.platform.entity.meta.PropertyDescriptor; | ||
|
||
/** | ||
* Base type for entity types that model a one-2-many association with an audit-entity to represent properties of the audited entity that were modified as part of an audit event. | ||
* <p> | ||
* This type does not declare any properties due to limited support for generically-typed properties. | ||
* Therefore, it is up to specific entity types to declare the required properties, which are: | ||
* <ol> | ||
* <li> {@code auditEntity: AE}; composite key-member. | ||
* <li> {@code property: PropertyDescriptor<AE>}; composite key-member. | ||
* <p> | ||
* Audit-entity type is used to parameterise the property descriptor because of the evolutionary model of audit-entity types. | ||
* The audited type cannot be used as it could result in a persisted property descriptor becoming invalid due to structural changes to the audited type. | ||
* </ol> | ||
* | ||
* @param <AE> type of the audit-entity | ||
*/ | ||
@KeyType(DynamicEntityKey.class) | ||
public abstract class AbstractAuditModProp<AE extends AbstractAuditEntity<?>> extends AbstractEntity<DynamicEntityKey> { | ||
|
||
public abstract AE getAuditedEntity(); | ||
|
||
public abstract AbstractAuditModProp<AE> setAuditedEntity(AE entity); | ||
|
||
public abstract PropertyDescriptor<AE> getProperty(); | ||
|
||
public abstract AbstractAuditModProp<AE> setProperty(PropertyDescriptor<AE> propertyDescriptor); | ||
|
||
} |