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 @@ import java.util.Map;
|
|||
/**
|
||||
* 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 class EntitiesConfigurations {
|
|||
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…
Reference in New Issue