HHH-11469 Remove deprecated ModificationStore
This commit is contained in:
parent
e513453aa4
commit
85388ec48f
|
@ -23,13 +23,6 @@ import java.lang.annotation.Target;
|
||||||
@Retention(RetentionPolicy.RUNTIME)
|
@Retention(RetentionPolicy.RUNTIME)
|
||||||
@Target({ElementType.TYPE, ElementType.METHOD, ElementType.FIELD})
|
@Target({ElementType.TYPE, ElementType.METHOD, ElementType.FIELD})
|
||||||
public @interface Audited {
|
public @interface Audited {
|
||||||
/**
|
|
||||||
* Specifies modification store to use
|
|
||||||
* @deprecated since 5.2, to be removed in 6.0 with no replacement.
|
|
||||||
*/
|
|
||||||
@Deprecated
|
|
||||||
ModificationStore modStore() default ModificationStore.FULL;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Specifies if the entity that is the target of the relation should be audited or not. If not, then when
|
* Specifies if the entity that is the target of the relation should be audited or not. If not, then when
|
||||||
* reading a historic version an audited entity, the relation will always point to the "current" entity.
|
* reading a historic version an audited entity, the relation will always point to the "current" entity.
|
||||||
|
|
|
@ -1,17 +0,0 @@
|
||||||
/*
|
|
||||||
* Hibernate, Relational Persistence for Idiomatic Java
|
|
||||||
*
|
|
||||||
* License: GNU Lesser General Public License (LGPL), version 2.1 or later.
|
|
||||||
* See the lgpl.txt file in the root directory or <http://www.gnu.org/licenses/lgpl-2.1.html>.
|
|
||||||
*/
|
|
||||||
package org.hibernate.envers;
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @author Adam Warski (adam at warski dot org)
|
|
||||||
* @deprecated since 5.2, to be removed in 6.0 with no replacement.
|
|
||||||
*/
|
|
||||||
@Deprecated
|
|
||||||
public enum ModificationStore {
|
|
||||||
FULL
|
|
||||||
}
|
|
|
@ -496,7 +496,7 @@ public class RevisionInfoConfiguration {
|
||||||
}
|
}
|
||||||
|
|
||||||
private PropertyData createPropertyData(String name, String accessType) {
|
private PropertyData createPropertyData(String name, String accessType) {
|
||||||
return new PropertyData( name, name, accessType, null );
|
return new PropertyData( name, name, accessType );
|
||||||
}
|
}
|
||||||
|
|
||||||
private boolean isAnyType(XClass clazz, Class<?>... types) {
|
private boolean isAnyType(XClass clazz, Class<?>... types) {
|
||||||
|
|
|
@ -18,7 +18,6 @@ import java.util.TreeSet;
|
||||||
|
|
||||||
import jakarta.persistence.EnumType;
|
import jakarta.persistence.EnumType;
|
||||||
|
|
||||||
import org.hibernate.envers.ModificationStore;
|
|
||||||
import org.hibernate.envers.boot.model.Attribute;
|
import org.hibernate.envers.boot.model.Attribute;
|
||||||
import org.hibernate.envers.boot.model.AttributeContainer;
|
import org.hibernate.envers.boot.model.AttributeContainer;
|
||||||
import org.hibernate.envers.boot.model.BasicAttribute;
|
import org.hibernate.envers.boot.model.BasicAttribute;
|
||||||
|
@ -326,7 +325,6 @@ public abstract class AbstractCollectionMetadataGenerator extends AbstractMetada
|
||||||
|
|
||||||
new ComponentAuditedPropertiesReader(
|
new ComponentAuditedPropertiesReader(
|
||||||
getMetadataBuildingContext(),
|
getMetadataBuildingContext(),
|
||||||
ModificationStore.FULL,
|
|
||||||
PersistentPropertiesSource.forComponent( getMetadataBuildingContext(), component ),
|
PersistentPropertiesSource.forComponent( getMetadataBuildingContext(), component ),
|
||||||
auditData
|
auditData
|
||||||
).read();
|
).read();
|
||||||
|
|
|
@ -9,8 +9,6 @@ package org.hibernate.envers.configuration.internal.metadata;
|
||||||
import java.util.Iterator;
|
import java.util.Iterator;
|
||||||
import java.util.Locale;
|
import java.util.Locale;
|
||||||
|
|
||||||
import org.hibernate.envers.ModificationStore;
|
|
||||||
import org.hibernate.envers.RelationTargetAuditMode;
|
|
||||||
import org.hibernate.envers.boot.EnversMappingException;
|
import org.hibernate.envers.boot.EnversMappingException;
|
||||||
import org.hibernate.envers.boot.model.AttributeContainer;
|
import org.hibernate.envers.boot.model.AttributeContainer;
|
||||||
import org.hibernate.envers.boot.model.CompositeIdentifier;
|
import org.hibernate.envers.boot.model.CompositeIdentifier;
|
||||||
|
@ -259,8 +257,7 @@ public final class IdMetadataGenerator extends AbstractMetadataGenerator {
|
||||||
return new PropertyData(
|
return new PropertyData(
|
||||||
property.getName(),
|
property.getName(),
|
||||||
property.getName(),
|
property.getName(),
|
||||||
property.getPropertyAccessorName(),
|
property.getPropertyAccessorName()
|
||||||
ModificationStore.FULL
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -181,7 +181,7 @@ public class JoinColumnCollectionMetadataGenerator extends AbstractCollectionMet
|
||||||
relMapper,
|
relMapper,
|
||||||
// The mapper will only be used to map from entity to map, so no need to provide other details
|
// The mapper will only be used to map from entity to map, so no need to provide other details
|
||||||
// when constructing the PropertyData.
|
// when constructing the PropertyData.
|
||||||
new PropertyData( auditMappedBy, null, null, null ),
|
new PropertyData( auditMappedBy, null, null ),
|
||||||
entityName,
|
entityName,
|
||||||
false,
|
false,
|
||||||
false
|
false
|
||||||
|
|
|
@ -11,7 +11,7 @@ import java.lang.annotation.Annotation;
|
||||||
import org.hibernate.annotations.common.reflection.XClass;
|
import org.hibernate.annotations.common.reflection.XClass;
|
||||||
import org.hibernate.envers.AuditTable;
|
import org.hibernate.envers.AuditTable;
|
||||||
import org.hibernate.envers.Audited;
|
import org.hibernate.envers.Audited;
|
||||||
import org.hibernate.envers.ModificationStore;
|
import org.hibernate.envers.RelationTargetAuditMode;
|
||||||
import org.hibernate.envers.SecondaryAuditTable;
|
import org.hibernate.envers.SecondaryAuditTable;
|
||||||
import org.hibernate.envers.SecondaryAuditTables;
|
import org.hibernate.envers.SecondaryAuditTables;
|
||||||
import org.hibernate.envers.boot.spi.EnversMetadataBuildingContext;
|
import org.hibernate.envers.boot.spi.EnversMetadataBuildingContext;
|
||||||
|
@ -31,11 +31,11 @@ public final class AnnotationsMetadataReader {
|
||||||
this.metadataBuildingContext = metadataBuildingContext;
|
this.metadataBuildingContext = metadataBuildingContext;
|
||||||
}
|
}
|
||||||
|
|
||||||
private ModificationStore getDefaultAudited(XClass clazz) {
|
private RelationTargetAuditMode getDefaultAudited(XClass clazz) {
|
||||||
final Audited defaultAudited = clazz.getAnnotation( Audited.class );
|
final Audited defaultAudited = clazz.getAnnotation( Audited.class );
|
||||||
|
|
||||||
if ( defaultAudited != null ) {
|
if ( defaultAudited != null ) {
|
||||||
return defaultAudited.modStore();
|
return defaultAudited.targetAuditMode();
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
return null;
|
return null;
|
||||||
|
@ -77,14 +77,13 @@ public final class AnnotationsMetadataReader {
|
||||||
final ClassAuditingData auditData = new ClassAuditingData( persistentClass );
|
final ClassAuditingData auditData = new ClassAuditingData( persistentClass );
|
||||||
final XClass xclass = metadataBuildingContext.getReflectionManager().toXClass( persistentClass.getMappedClass() );
|
final XClass xclass = metadataBuildingContext.getReflectionManager().toXClass( persistentClass.getMappedClass() );
|
||||||
|
|
||||||
final ModificationStore defaultStore = getDefaultAudited( xclass );
|
final RelationTargetAuditMode auditMode = getDefaultAudited( xclass );
|
||||||
if ( defaultStore != null ) {
|
if ( auditMode != null ) {
|
||||||
auditData.setDefaultAudited( true );
|
auditData.setDefaultAudited( true );
|
||||||
}
|
}
|
||||||
|
|
||||||
new AuditedPropertiesReader(
|
new AuditedPropertiesReader(
|
||||||
metadataBuildingContext,
|
metadataBuildingContext,
|
||||||
defaultStore,
|
|
||||||
PersistentPropertiesSource.forClass( persistentClass, xclass ),
|
PersistentPropertiesSource.forClass( persistentClass, xclass ),
|
||||||
auditData
|
auditData
|
||||||
).read();
|
).read();
|
||||||
|
|
|
@ -32,7 +32,6 @@ import org.hibernate.envers.AuditMappedBy;
|
||||||
import org.hibernate.envers.AuditOverride;
|
import org.hibernate.envers.AuditOverride;
|
||||||
import org.hibernate.envers.AuditOverrides;
|
import org.hibernate.envers.AuditOverrides;
|
||||||
import org.hibernate.envers.Audited;
|
import org.hibernate.envers.Audited;
|
||||||
import org.hibernate.envers.ModificationStore;
|
|
||||||
import org.hibernate.envers.NotAudited;
|
import org.hibernate.envers.NotAudited;
|
||||||
import org.hibernate.envers.RelationTargetAuditMode;
|
import org.hibernate.envers.RelationTargetAuditMode;
|
||||||
import org.hibernate.envers.boot.EnversMappingException;
|
import org.hibernate.envers.boot.EnversMappingException;
|
||||||
|
@ -68,7 +67,6 @@ public class AuditedPropertiesReader {
|
||||||
|
|
||||||
public static final String NO_PREFIX = "";
|
public static final String NO_PREFIX = "";
|
||||||
|
|
||||||
protected final ModificationStore defaultStore;
|
|
||||||
private final PersistentPropertiesSource persistentPropertiesSource;
|
private final PersistentPropertiesSource persistentPropertiesSource;
|
||||||
private final AuditedPropertiesHolder auditedPropertiesHolder;
|
private final AuditedPropertiesHolder auditedPropertiesHolder;
|
||||||
private final EnversMetadataBuildingContext metadataBuildingContext;
|
private final EnversMetadataBuildingContext metadataBuildingContext;
|
||||||
|
@ -88,19 +86,16 @@ public class AuditedPropertiesReader {
|
||||||
|
|
||||||
public AuditedPropertiesReader(
|
public AuditedPropertiesReader(
|
||||||
EnversMetadataBuildingContext metadataBuildingContext,
|
EnversMetadataBuildingContext metadataBuildingContext,
|
||||||
ModificationStore defaultStore,
|
|
||||||
PersistentPropertiesSource persistentPropertiesSource,
|
PersistentPropertiesSource persistentPropertiesSource,
|
||||||
AuditedPropertiesHolder auditedPropertiesHolder) {
|
AuditedPropertiesHolder auditedPropertiesHolder) {
|
||||||
this ( metadataBuildingContext, defaultStore, persistentPropertiesSource, auditedPropertiesHolder, NO_PREFIX );
|
this ( metadataBuildingContext, persistentPropertiesSource, auditedPropertiesHolder, NO_PREFIX );
|
||||||
}
|
}
|
||||||
|
|
||||||
public AuditedPropertiesReader(
|
public AuditedPropertiesReader(
|
||||||
EnversMetadataBuildingContext metadataBuildingContext,
|
EnversMetadataBuildingContext metadataBuildingContext,
|
||||||
ModificationStore defaultStore,
|
|
||||||
PersistentPropertiesSource persistentPropertiesSource,
|
PersistentPropertiesSource persistentPropertiesSource,
|
||||||
AuditedPropertiesHolder auditedPropertiesHolder,
|
AuditedPropertiesHolder auditedPropertiesHolder,
|
||||||
String propertyNamePrefix) {
|
String propertyNamePrefix) {
|
||||||
this.defaultStore = defaultStore;
|
|
||||||
this.persistentPropertiesSource = persistentPropertiesSource;
|
this.persistentPropertiesSource = persistentPropertiesSource;
|
||||||
this.auditedPropertiesHolder = auditedPropertiesHolder;
|
this.auditedPropertiesHolder = auditedPropertiesHolder;
|
||||||
this.metadataBuildingContext = metadataBuildingContext;
|
this.metadataBuildingContext = metadataBuildingContext;
|
||||||
|
@ -441,7 +436,6 @@ public class AuditedPropertiesReader {
|
||||||
);
|
);
|
||||||
final AuditedPropertiesReader audPropReader = new AuditedPropertiesReader(
|
final AuditedPropertiesReader audPropReader = new AuditedPropertiesReader(
|
||||||
metadataBuildingContext,
|
metadataBuildingContext,
|
||||||
ModificationStore.FULL,
|
|
||||||
componentPropertiesSource,
|
componentPropertiesSource,
|
||||||
componentData,
|
componentData,
|
||||||
propertyNamePrefix + MappingTools.createComponentPrefix( embeddedName )
|
propertyNamePrefix + MappingTools.createComponentPrefix( embeddedName )
|
||||||
|
@ -471,7 +465,6 @@ public class AuditedPropertiesReader {
|
||||||
|
|
||||||
final ComponentAuditedPropertiesReader audPropReader = new ComponentAuditedPropertiesReader(
|
final ComponentAuditedPropertiesReader audPropReader = new ComponentAuditedPropertiesReader(
|
||||||
metadataBuildingContext,
|
metadataBuildingContext,
|
||||||
ModificationStore.FULL,
|
|
||||||
componentPropertiesSource,
|
componentPropertiesSource,
|
||||||
componentData,
|
componentData,
|
||||||
propertyNamePrefix + MappingTools.createComponentPrefix( property.getName() )
|
propertyNamePrefix + MappingTools.createComponentPrefix( property.getName() )
|
||||||
|
@ -596,7 +589,6 @@ public class AuditedPropertiesReader {
|
||||||
aud = DEFAULT_AUDITED;
|
aud = DEFAULT_AUDITED;
|
||||||
}
|
}
|
||||||
if ( aud != null ) {
|
if ( aud != null ) {
|
||||||
propertyData.setStore( aud.modStore() );
|
|
||||||
propertyData.setRelationTargetAuditMode( aud.targetAuditMode() );
|
propertyData.setRelationTargetAuditMode( aud.targetAuditMode() );
|
||||||
propertyData.setUsingModifiedFlag( checkUsingModifiedFlag( aud ) );
|
propertyData.setUsingModifiedFlag( checkUsingModifiedFlag( aud ) );
|
||||||
propertyData.setModifiedFlagName( ModifiedColumnNameResolver.getName( propertyName, modifiedFlagSuffix ) );
|
propertyData.setModifiedFlagName( ModifiedColumnNameResolver.getName( propertyName, modifiedFlagSuffix ) );
|
||||||
|
@ -724,11 +716,6 @@ public class AuditedPropertiesReader {
|
||||||
}
|
}
|
||||||
|
|
||||||
private static final Audited DEFAULT_AUDITED = new Audited() {
|
private static final Audited DEFAULT_AUDITED = new Audited() {
|
||||||
@Override
|
|
||||||
public ModificationStore modStore() {
|
|
||||||
return ModificationStore.FULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public RelationTargetAuditMode targetAuditMode() {
|
public RelationTargetAuditMode targetAuditMode() {
|
||||||
return RelationTargetAuditMode.AUDITED;
|
return RelationTargetAuditMode.AUDITED;
|
||||||
|
|
|
@ -8,7 +8,6 @@ package org.hibernate.envers.configuration.internal.metadata.reader;
|
||||||
|
|
||||||
import org.hibernate.annotations.common.reflection.XProperty;
|
import org.hibernate.annotations.common.reflection.XProperty;
|
||||||
import org.hibernate.envers.Audited;
|
import org.hibernate.envers.Audited;
|
||||||
import org.hibernate.envers.ModificationStore;
|
|
||||||
import org.hibernate.envers.boot.internal.ModifiedColumnNameResolver;
|
import org.hibernate.envers.boot.internal.ModifiedColumnNameResolver;
|
||||||
import org.hibernate.envers.boot.spi.EnversMetadataBuildingContext;
|
import org.hibernate.envers.boot.spi.EnversMetadataBuildingContext;
|
||||||
import org.hibernate.internal.util.StringHelper;
|
import org.hibernate.internal.util.StringHelper;
|
||||||
|
@ -24,21 +23,18 @@ public class ComponentAuditedPropertiesReader extends AuditedPropertiesReader {
|
||||||
|
|
||||||
public ComponentAuditedPropertiesReader(
|
public ComponentAuditedPropertiesReader(
|
||||||
EnversMetadataBuildingContext metadataBuildingContext,
|
EnversMetadataBuildingContext metadataBuildingContext,
|
||||||
ModificationStore defaultStore,
|
|
||||||
PersistentPropertiesSource persistentPropertiesSource,
|
PersistentPropertiesSource persistentPropertiesSource,
|
||||||
AuditedPropertiesHolder auditedPropertiesHolder) {
|
AuditedPropertiesHolder auditedPropertiesHolder) {
|
||||||
this( metadataBuildingContext, defaultStore, persistentPropertiesSource, auditedPropertiesHolder, NO_PREFIX );
|
this( metadataBuildingContext, persistentPropertiesSource, auditedPropertiesHolder, NO_PREFIX );
|
||||||
}
|
}
|
||||||
|
|
||||||
public ComponentAuditedPropertiesReader(
|
public ComponentAuditedPropertiesReader(
|
||||||
EnversMetadataBuildingContext metadataBuildingContext,
|
EnversMetadataBuildingContext metadataBuildingContext,
|
||||||
ModificationStore defaultStore,
|
|
||||||
PersistentPropertiesSource persistentPropertiesSource,
|
PersistentPropertiesSource persistentPropertiesSource,
|
||||||
AuditedPropertiesHolder auditedPropertiesHolder,
|
AuditedPropertiesHolder auditedPropertiesHolder,
|
||||||
String propertyNamePrefix) {
|
String propertyNamePrefix) {
|
||||||
super(
|
super(
|
||||||
metadataBuildingContext,
|
metadataBuildingContext,
|
||||||
defaultStore,
|
|
||||||
persistentPropertiesSource,
|
persistentPropertiesSource,
|
||||||
auditedPropertiesHolder,
|
auditedPropertiesHolder,
|
||||||
propertyNamePrefix
|
propertyNamePrefix
|
||||||
|
@ -55,7 +51,6 @@ public class ComponentAuditedPropertiesReader extends AuditedPropertiesReader {
|
||||||
// Checking if this property is explicitly audited or if all properties are.
|
// Checking if this property is explicitly audited or if all properties are.
|
||||||
final Audited aud = property.getAnnotation( Audited.class );
|
final Audited aud = property.getAnnotation( Audited.class );
|
||||||
if ( aud != null ) {
|
if ( aud != null ) {
|
||||||
propertyData.setStore( aud.modStore() );
|
|
||||||
propertyData.setRelationTargetAuditMode( aud.targetAuditMode() );
|
propertyData.setRelationTargetAuditMode( aud.targetAuditMode() );
|
||||||
propertyData.setUsingModifiedFlag( checkUsingModifiedFlag( aud ) );
|
propertyData.setUsingModifiedFlag( checkUsingModifiedFlag( aud ) );
|
||||||
propertyData.setModifiedFlagName( ModifiedColumnNameResolver.getName( propertyName, modifiedFlagSuffix ) );
|
propertyData.setModifiedFlagName( ModifiedColumnNameResolver.getName( propertyName, modifiedFlagSuffix ) );
|
||||||
|
@ -63,9 +58,6 @@ public class ComponentAuditedPropertiesReader extends AuditedPropertiesReader {
|
||||||
propertyData.setExplicitModifiedFlagName( aud.modifiedColumnName() );
|
propertyData.setExplicitModifiedFlagName( aud.modifiedColumnName() );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
|
||||||
propertyData.setStore( ModificationStore.FULL );
|
|
||||||
}
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -14,7 +14,6 @@ import jakarta.persistence.EnumType;
|
||||||
|
|
||||||
import org.hibernate.envers.AuditOverride;
|
import org.hibernate.envers.AuditOverride;
|
||||||
import org.hibernate.envers.AuditOverrides;
|
import org.hibernate.envers.AuditOverrides;
|
||||||
import org.hibernate.envers.ModificationStore;
|
|
||||||
import org.hibernate.envers.RelationTargetAuditMode;
|
import org.hibernate.envers.RelationTargetAuditMode;
|
||||||
import org.hibernate.envers.internal.entities.PropertyData;
|
import org.hibernate.envers.internal.entities.PropertyData;
|
||||||
import org.hibernate.envers.internal.tools.StringTools;
|
import org.hibernate.envers.internal.tools.StringTools;
|
||||||
|
@ -31,7 +30,6 @@ import org.hibernate.type.Type;
|
||||||
public class PropertyAuditingData {
|
public class PropertyAuditingData {
|
||||||
private String name;
|
private String name;
|
||||||
private String beanName;
|
private String beanName;
|
||||||
private ModificationStore store;
|
|
||||||
private String mapKey;
|
private String mapKey;
|
||||||
private EnumType mapKeyEnumType;
|
private EnumType mapKeyEnumType;
|
||||||
private AuditJoinTableData joinTable;
|
private AuditJoinTableData joinTable;
|
||||||
|
@ -69,7 +67,6 @@ public class PropertyAuditingData {
|
||||||
this(
|
this(
|
||||||
name,
|
name,
|
||||||
accessType,
|
accessType,
|
||||||
ModificationStore.FULL,
|
|
||||||
RelationTargetAuditMode.AUDITED,
|
RelationTargetAuditMode.AUDITED,
|
||||||
null,
|
null,
|
||||||
null,
|
null,
|
||||||
|
@ -97,7 +94,6 @@ public class PropertyAuditingData {
|
||||||
this(
|
this(
|
||||||
name,
|
name,
|
||||||
accessType,
|
accessType,
|
||||||
ModificationStore.FULL,
|
|
||||||
RelationTargetAuditMode.AUDITED,
|
RelationTargetAuditMode.AUDITED,
|
||||||
null,
|
null,
|
||||||
null,
|
null,
|
||||||
|
@ -110,7 +106,6 @@ public class PropertyAuditingData {
|
||||||
public PropertyAuditingData(
|
public PropertyAuditingData(
|
||||||
String name,
|
String name,
|
||||||
String accessType,
|
String accessType,
|
||||||
ModificationStore store,
|
|
||||||
RelationTargetAuditMode relationTargetAuditMode,
|
RelationTargetAuditMode relationTargetAuditMode,
|
||||||
String auditMappedBy,
|
String auditMappedBy,
|
||||||
String positionMappedBy,
|
String positionMappedBy,
|
||||||
|
@ -120,7 +115,6 @@ public class PropertyAuditingData {
|
||||||
this.name = name;
|
this.name = name;
|
||||||
this.beanName = name;
|
this.beanName = name;
|
||||||
this.accessType = accessType;
|
this.accessType = accessType;
|
||||||
this.store = store;
|
|
||||||
this.relationTargetAuditMode = relationTargetAuditMode;
|
this.relationTargetAuditMode = relationTargetAuditMode;
|
||||||
this.auditMappedBy = auditMappedBy;
|
this.auditMappedBy = auditMappedBy;
|
||||||
this.positionMappedBy = positionMappedBy;
|
this.positionMappedBy = positionMappedBy;
|
||||||
|
@ -145,22 +139,6 @@ public class PropertyAuditingData {
|
||||||
this.beanName = beanName;
|
this.beanName = beanName;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* @deprecated since 5.2, to be removed in 6.0 with no replacement.
|
|
||||||
*/
|
|
||||||
@Deprecated
|
|
||||||
public ModificationStore getStore() {
|
|
||||||
return store;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @deprecated since 5.2, to be removed in 6.0 with no replacement.
|
|
||||||
*/
|
|
||||||
@Deprecated
|
|
||||||
public void setStore(ModificationStore store) {
|
|
||||||
this.store = store;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getMapKey() {
|
public String getMapKey() {
|
||||||
return mapKey;
|
return mapKey;
|
||||||
}
|
}
|
||||||
|
@ -341,7 +319,6 @@ public class PropertyAuditingData {
|
||||||
name,
|
name,
|
||||||
beanName,
|
beanName,
|
||||||
accessType,
|
accessType,
|
||||||
store,
|
|
||||||
usingModifiedFlag,
|
usingModifiedFlag,
|
||||||
modifiedFlagName,
|
modifiedFlagName,
|
||||||
synthetic,
|
synthetic,
|
||||||
|
@ -354,7 +331,6 @@ public class PropertyAuditingData {
|
||||||
name,
|
name,
|
||||||
beanName,
|
beanName,
|
||||||
accessType,
|
accessType,
|
||||||
store,
|
|
||||||
usingModifiedFlag,
|
usingModifiedFlag,
|
||||||
modifiedFlagName,
|
modifiedFlagName,
|
||||||
synthetic,
|
synthetic,
|
||||||
|
@ -365,7 +341,6 @@ public class PropertyAuditingData {
|
||||||
name,
|
name,
|
||||||
beanName,
|
beanName,
|
||||||
accessType,
|
accessType,
|
||||||
store,
|
|
||||||
usingModifiedFlag,
|
usingModifiedFlag,
|
||||||
modifiedFlagName,
|
modifiedFlagName,
|
||||||
synthetic,
|
synthetic,
|
||||||
|
|
|
@ -8,7 +8,6 @@ package org.hibernate.envers.internal.entities;
|
||||||
|
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
|
|
||||||
import org.hibernate.envers.ModificationStore;
|
|
||||||
import org.hibernate.type.Type;
|
import org.hibernate.type.Type;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -24,7 +23,6 @@ public class PropertyData {
|
||||||
*/
|
*/
|
||||||
private final String beanName;
|
private final String beanName;
|
||||||
private final String accessType;
|
private final String accessType;
|
||||||
private final ModificationStore store;
|
|
||||||
private boolean usingModifiedFlag;
|
private boolean usingModifiedFlag;
|
||||||
private String modifiedFlagName;
|
private String modifiedFlagName;
|
||||||
// Synthetic properties are ones which are not part of the actual java model.
|
// Synthetic properties are ones which are not part of the actual java model.
|
||||||
|
@ -43,7 +41,6 @@ public class PropertyData {
|
||||||
this.name = newName;
|
this.name = newName;
|
||||||
this.beanName = propertyData.beanName;
|
this.beanName = propertyData.beanName;
|
||||||
this.accessType = propertyData.accessType;
|
this.accessType = propertyData.accessType;
|
||||||
this.store = propertyData.store;
|
|
||||||
|
|
||||||
this.usingModifiedFlag = propertyData.usingModifiedFlag;
|
this.usingModifiedFlag = propertyData.usingModifiedFlag;
|
||||||
this.modifiedFlagName = propertyData.modifiedFlagName;
|
this.modifiedFlagName = propertyData.modifiedFlagName;
|
||||||
|
@ -56,17 +53,15 @@ public class PropertyData {
|
||||||
* @param name Name of the property.
|
* @param name Name of the property.
|
||||||
* @param beanName Name of the property in the bean.
|
* @param beanName Name of the property in the bean.
|
||||||
* @param accessType Accessor type for this property.
|
* @param accessType Accessor type for this property.
|
||||||
* @param store How this property should be stored.
|
|
||||||
*/
|
*/
|
||||||
public PropertyData(String name, String beanName, String accessType, ModificationStore store) {
|
public PropertyData(String name, String beanName, String accessType) {
|
||||||
this.name = name;
|
this.name = name;
|
||||||
this.beanName = beanName;
|
this.beanName = beanName;
|
||||||
this.accessType = accessType;
|
this.accessType = accessType;
|
||||||
this.store = store;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private PropertyData(String name, String beanName, String accessType, ModificationStore store, Type propertyType) {
|
private PropertyData(String name, String beanName, String accessType, Type propertyType) {
|
||||||
this( name, beanName, accessType, store );
|
this( name, beanName, accessType );
|
||||||
this.propertyType = propertyType;
|
this.propertyType = propertyType;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -74,18 +69,16 @@ public class PropertyData {
|
||||||
* @param name Name of the property.
|
* @param name Name of the property.
|
||||||
* @param beanName Name of the property in the bean.
|
* @param beanName Name of the property in the bean.
|
||||||
* @param accessType Accessor type for this property.
|
* @param accessType Accessor type for this property.
|
||||||
* @param store How this property should be stored.
|
|
||||||
* @param usingModifiedFlag Defines if field changes should be tracked
|
* @param usingModifiedFlag Defines if field changes should be tracked
|
||||||
*/
|
*/
|
||||||
public PropertyData(
|
public PropertyData(
|
||||||
String name,
|
String name,
|
||||||
String beanName,
|
String beanName,
|
||||||
String accessType,
|
String accessType,
|
||||||
ModificationStore store,
|
|
||||||
boolean usingModifiedFlag,
|
boolean usingModifiedFlag,
|
||||||
String modifiedFlagName,
|
String modifiedFlagName,
|
||||||
boolean synthetic) {
|
boolean synthetic) {
|
||||||
this( name, beanName, accessType, store );
|
this( name, beanName, accessType );
|
||||||
this.usingModifiedFlag = usingModifiedFlag;
|
this.usingModifiedFlag = usingModifiedFlag;
|
||||||
this.modifiedFlagName = modifiedFlagName;
|
this.modifiedFlagName = modifiedFlagName;
|
||||||
this.synthetic = synthetic;
|
this.synthetic = synthetic;
|
||||||
|
@ -95,25 +88,23 @@ public class PropertyData {
|
||||||
String name,
|
String name,
|
||||||
String beanName,
|
String beanName,
|
||||||
String accessType,
|
String accessType,
|
||||||
ModificationStore store,
|
|
||||||
boolean usingModifiedFlag,
|
boolean usingModifiedFlag,
|
||||||
String modifiedFlagName,
|
String modifiedFlagName,
|
||||||
boolean synthetic,
|
boolean synthetic,
|
||||||
Type propertyType) {
|
Type propertyType) {
|
||||||
this( name, beanName, accessType, store, usingModifiedFlag, modifiedFlagName, synthetic, propertyType, null );
|
this( name, beanName, accessType, usingModifiedFlag, modifiedFlagName, synthetic, propertyType, null );
|
||||||
}
|
}
|
||||||
|
|
||||||
public PropertyData(
|
public PropertyData(
|
||||||
String name,
|
String name,
|
||||||
String beanName,
|
String beanName,
|
||||||
String accessType,
|
String accessType,
|
||||||
ModificationStore store,
|
|
||||||
boolean usingModifiedFlag,
|
boolean usingModifiedFlag,
|
||||||
String modifiedFlagName,
|
String modifiedFlagName,
|
||||||
boolean synthetic,
|
boolean synthetic,
|
||||||
Type propertyType,
|
Type propertyType,
|
||||||
Class<?> virtualReturnClass) {
|
Class<?> virtualReturnClass) {
|
||||||
this( name, beanName, accessType, store, usingModifiedFlag, modifiedFlagName, synthetic );
|
this( name, beanName, accessType, usingModifiedFlag, modifiedFlagName, synthetic );
|
||||||
this.propertyType = propertyType;
|
this.propertyType = propertyType;
|
||||||
this.virtualReturnClass = virtualReturnClass;
|
this.virtualReturnClass = virtualReturnClass;
|
||||||
}
|
}
|
||||||
|
@ -130,14 +121,6 @@ public class PropertyData {
|
||||||
return accessType;
|
return accessType;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* @deprecated since 5.2, to be removed in 6.0 with no replacement.
|
|
||||||
*/
|
|
||||||
@Deprecated
|
|
||||||
public ModificationStore getStore() {
|
|
||||||
return store;
|
|
||||||
}
|
|
||||||
|
|
||||||
public boolean isUsingModifiedFlag() {
|
public boolean isUsingModifiedFlag() {
|
||||||
return usingModifiedFlag;
|
return usingModifiedFlag;
|
||||||
}
|
}
|
||||||
|
@ -169,7 +152,6 @@ public class PropertyData {
|
||||||
|
|
||||||
final PropertyData that = (PropertyData) o;
|
final PropertyData that = (PropertyData) o;
|
||||||
return usingModifiedFlag == that.usingModifiedFlag
|
return usingModifiedFlag == that.usingModifiedFlag
|
||||||
&& store == that.store
|
|
||||||
&& Objects.equals( accessType, that.accessType )
|
&& Objects.equals( accessType, that.accessType )
|
||||||
&& Objects.equals( beanName, that.beanName )
|
&& Objects.equals( beanName, that.beanName )
|
||||||
&& Objects.equals( name, that.name )
|
&& Objects.equals( name, that.name )
|
||||||
|
@ -181,7 +163,6 @@ public class PropertyData {
|
||||||
int result = name != null ? name.hashCode() : 0;
|
int result = name != null ? name.hashCode() : 0;
|
||||||
result = 31 * result + (beanName != null ? beanName.hashCode() : 0);
|
result = 31 * result + (beanName != null ? beanName.hashCode() : 0);
|
||||||
result = 31 * result + (accessType != null ? accessType.hashCode() : 0);
|
result = 31 * result + (accessType != null ? accessType.hashCode() : 0);
|
||||||
result = 31 * result + (store != null ? store.hashCode() : 0);
|
|
||||||
result = 31 * result + (usingModifiedFlag ? 1 : 0);
|
result = 31 * result + (usingModifiedFlag ? 1 : 0);
|
||||||
result = 31 * result + (synthetic ? 1 : 0);
|
result = 31 * result + (synthetic ? 1 : 0);
|
||||||
return result;
|
return result;
|
||||||
|
@ -192,7 +173,6 @@ public class PropertyData {
|
||||||
propertyName,
|
propertyName,
|
||||||
null,
|
null,
|
||||||
null,
|
null,
|
||||||
null,
|
|
||||||
propertyType
|
propertyType
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue