|
Hibernate example source code file (ComponentAuditedPropertiesReader.java)
The Hibernate ComponentAuditedPropertiesReader.java source codepackage org.hibernate.envers.configuration.metadata.reader; import org.hibernate.annotations.common.reflection.ReflectionManager; import org.hibernate.annotations.common.reflection.XProperty; import org.hibernate.envers.Audited; import org.hibernate.envers.ModificationStore; import org.hibernate.envers.configuration.GlobalConfiguration; /** * Reads the audited properties for components. * * @author Hern&aacut;n Chanfreau * */ public class ComponentAuditedPropertiesReader extends AuditedPropertiesReader { public ComponentAuditedPropertiesReader(ModificationStore defaultStore, PersistentPropertiesSource persistentPropertiesSource, AuditedPropertiesHolder auditedPropertiesHolder, GlobalConfiguration globalCfg, ReflectionManager reflectionManager, String propertyNamePrefix) { super(defaultStore, persistentPropertiesSource, auditedPropertiesHolder, globalCfg, reflectionManager, propertyNamePrefix); } @Override protected boolean checkAudited(XProperty property, PropertyAuditingData propertyData, Audited allClassAudited) { // Checking if this property is explicitly audited or if all properties are. Audited aud = property.getAnnotation(Audited.class); if (aud != null) { propertyData.setStore(aud.modStore()); propertyData.setRelationTargetAuditMode(aud.targetAuditMode()); } else { propertyData.setStore(ModificationStore.FULL); } return true; } } Other Hibernate examples (source code examples)Here is a short list of links related to this Hibernate ComponentAuditedPropertiesReader.java source code file: |
... this post is sponsored by my books ... | |
#1 New Release! |
FP Best Seller |
Copyright 1998-2021 Alvin Alexander, alvinalexander.com
All Rights Reserved.
A percentage of advertising revenue from
pages under the /java/jwarehouse
URI on this website is
paid back to open source projects.