HHH-9194 : Revert HHH-8908 fix

This commit is contained in:
Gail Badner 2014-05-15 18:11:40 -07:00
parent d36b3a3e97
commit 27da278f07
4 changed files with 13 additions and 13 deletions

View File

@ -605,7 +605,7 @@ public final class CollectionMetadataGenerator {
final ReflectionManager reflectionManager = mainGenerator.getCfg().getReflectionManager();
new ComponentAuditedPropertiesReader(
true, // true because the collection is being audited
ModificationStore.FULL,
new AuditedPropertiesReader.ComponentPropertiesSource( reflectionManager, component ),
auditData, mainGenerator.getGlobalCfg(), reflectionManager, ""
).read();

View File

@ -65,7 +65,7 @@ public final class AnnotationsMetadataReader {
auditData = new ClassAuditingData();
}
private ModificationStore getDefaultAuditedModStore(XClass clazz) {
private ModificationStore getDefaultAudited(XClass clazz) {
final Audited defaultAudited = clazz.getAnnotation( Audited.class );
if ( defaultAudited != null ) {
@ -115,13 +115,13 @@ public final class AnnotationsMetadataReader {
try {
final XClass xclass = reflectionManager.classForName( pc.getClassName(), this.getClass() );
final ModificationStore defaultStore = getDefaultAuditedModStore( xclass );
final ModificationStore defaultStore = getDefaultAudited( xclass );
if ( defaultStore != null ) {
auditData.setDefaultAudited( true );
}
new AuditedPropertiesReader(
auditData.isAudited(),
defaultStore,
new PersistentClassPropertiesSource( xclass ),
auditData,
globalCfg,

View File

@ -72,7 +72,7 @@ import static org.hibernate.envers.internal.tools.Tools.newHashSet;
* @author Lukasz Zuchowski (author at zuchos dot com)
*/
public class AuditedPropertiesReader {
private final boolean defaultAudited;
protected final ModificationStore defaultStore;
private final PersistentPropertiesSource persistentPropertiesSource;
private final AuditedPropertiesHolder auditedPropertiesHolder;
private final GlobalConfiguration globalCfg;
@ -91,13 +91,13 @@ public class AuditedPropertiesReader {
private final Set<XClass> overriddenNotAuditedClasses;
public AuditedPropertiesReader(
boolean defaultAudited,
ModificationStore defaultStore,
PersistentPropertiesSource persistentPropertiesSource,
AuditedPropertiesHolder auditedPropertiesHolder,
GlobalConfiguration globalCfg,
ReflectionManager reflectionManager,
String propertyNamePrefix) {
this.defaultAudited = defaultAudited;
this.defaultStore = defaultStore;
this.persistentPropertiesSource = persistentPropertiesSource;
this.auditedPropertiesHolder = auditedPropertiesHolder;
this.globalCfg = globalCfg;
@ -368,7 +368,7 @@ public class AuditedPropertiesReader {
allClassAudited
);
if ( allClassAudited != null || !auditedPropertiesHolder.isEmpty() || defaultAudited ) {
if ( allClassAudited != null || !auditedPropertiesHolder.isEmpty() ) {
final XClass superclazz = clazz.getSuperclass();
if ( !clazz.isInterface() && !"java.lang.Object".equals( superclazz.getName() ) ) {
addPropertiesFromClass( superclazz );
@ -432,8 +432,8 @@ public class AuditedPropertiesReader {
propertyValue
);
final AuditedPropertiesReader audPropReader = new AuditedPropertiesReader(
defaultAudited, componentPropertiesSource, componentData, globalCfg,
reflectionManager, propertyNamePrefix + MappingTools.createComponentPrefix( embeddedName )
ModificationStore.FULL, componentPropertiesSource, componentData, globalCfg, reflectionManager,
propertyNamePrefix + MappingTools.createComponentPrefix( embeddedName )
);
audPropReader.read();
@ -458,7 +458,7 @@ public class AuditedPropertiesReader {
}
final ComponentAuditedPropertiesReader audPropReader = new ComponentAuditedPropertiesReader(
isAudited,
ModificationStore.FULL,
componentPropertiesSource,
componentData,
globalCfg,

View File

@ -38,13 +38,13 @@ import org.hibernate.envers.configuration.internal.GlobalConfiguration;
public class ComponentAuditedPropertiesReader extends AuditedPropertiesReader {
public ComponentAuditedPropertiesReader(
boolean defaultAudited,
ModificationStore defaultStore,
PersistentPropertiesSource persistentPropertiesSource,
AuditedPropertiesHolder auditedPropertiesHolder,
GlobalConfiguration globalCfg, ReflectionManager reflectionManager,
String propertyNamePrefix) {
super(
defaultAudited, persistentPropertiesSource, auditedPropertiesHolder,
defaultStore, persistentPropertiesSource, auditedPropertiesHolder,
globalCfg, reflectionManager, propertyNamePrefix
);
}