mirror of
https://github.com/hibernate/hibernate-orm
synced 2025-02-16 16:15:06 +00:00
Resolving HHH-5588: Improve support for entityNames in envers.
Adding isNotAudited for determine if an entity is marked as @Audited(NOT_AUDITED)
This commit is contained in:
parent
eaeb4f8343
commit
7ec8c11327
@ -29,6 +29,7 @@
|
||||
/**
|
||||
* Configuration of the user entities: property mapping of the entities, relations, inheritance.
|
||||
* @author Adam Warski (adam at warski dot org)
|
||||
* @author Hernán Chanfreau
|
||||
*/
|
||||
public class EntitiesConfigurations {
|
||||
private Map<String, EntityConfiguration> entitiesConfigurations;
|
||||
@ -96,6 +97,14 @@ public boolean isVersioned(String entityName) {
|
||||
return get(entityName) != null;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param entityName
|
||||
* @return true if the given entityName is marked audited with relationTargetAuditMode = NOT_AUDITED
|
||||
*/
|
||||
public boolean isNotAudited(String entityName) {
|
||||
return getNotVersionEntityConfiguration(entityName) != null;
|
||||
}
|
||||
|
||||
public RelationDescription getRelationDescription(String entityName, String propertyName) {
|
||||
EntityConfiguration entCfg = entitiesConfigurations.get(entityName);
|
||||
RelationDescription relDesc = entCfg.getRelationDescription(propertyName);
|
||||
|
Loading…
x
Reference in New Issue
Block a user