HHH-5580 - Cleanup
This commit is contained in:
parent
c2e53061f2
commit
e558538ca1
|
@ -9,12 +9,8 @@ import java.util.Set;
|
|||
|
||||
/**
|
||||
* Extension of {@link DefaultRevisionEntity} that allows tracking entity types changed in each revision. This revision
|
||||
* entity is implicitly used when one of the following conditions is satisfied:
|
||||
* <ul>
|
||||
* <li><code>org.hibernate.envers.track_entities_changed_in_revision</code> parameter is set to <code>true</code>.</li>
|
||||
* <li>Custom revision entity (annotated with {@link RevisionEntity}) extends {@link DefaultTrackingModifiedTypesRevisionEntity}.</li>
|
||||
* <li>Custom revision entity (annotated with {@link RevisionEntity}) encapsulates a field marked with {@link ModifiedEntityTypes}.</li>
|
||||
* </ul>
|
||||
* entity is implicitly used when <code>org.hibernate.envers.track_entities_changed_in_revision</code> parameter
|
||||
* is set to <code>true</code>.
|
||||
* @author Lukasz Antoniak (lukasz dot antoniak at gmail dot com)
|
||||
*/
|
||||
@MappedSuperclass
|
||||
|
@ -54,6 +50,6 @@ public class DefaultTrackingModifiedTypesRevisionEntity extends DefaultRevisionE
|
|||
}
|
||||
|
||||
public String toString() {
|
||||
return "DefaultTrackingModifiedTypesRevisionEntity(" + super.toString() + ", modifiedEntityTypes = " + modifiedEntityTypes.toString() + ")";
|
||||
return "DefaultTrackingModifiedTypesRevisionEntity(" + super.toString() + ", modifiedEntityTypes = " + modifiedEntityTypes + ")";
|
||||
}
|
||||
}
|
||||
|
|
|
@ -6,7 +6,7 @@ import java.lang.annotation.RetentionPolicy;
|
|||
import java.lang.annotation.Target;
|
||||
|
||||
/**
|
||||
* Marks a property which will hold the collection of entity names modified during each revision.
|
||||
* Marks a property which will hold the collection of entity class names modified during each revision.
|
||||
* This annotation expects field of <code>{@literal Set<String>}</code> type.
|
||||
* @author Lukasz Antoniak (lukasz dot antoniak at gmail dot com)
|
||||
*/
|
||||
|
|
|
@ -45,7 +45,12 @@ import org.hibernate.envers.RevisionTimestamp;
|
|||
import org.hibernate.envers.configuration.metadata.AuditTableData;
|
||||
import org.hibernate.envers.configuration.metadata.MetadataTools;
|
||||
import org.hibernate.envers.entities.PropertyData;
|
||||
import org.hibernate.envers.revisioninfo.*;
|
||||
import org.hibernate.envers.revisioninfo.DefaultRevisionInfoGenerator;
|
||||
import org.hibernate.envers.revisioninfo.DefaultTrackingModifiedTypesRevisionInfoGenerator;
|
||||
import org.hibernate.envers.revisioninfo.ModifiedEntityTypesReader;
|
||||
import org.hibernate.envers.revisioninfo.RevisionInfoGenerator;
|
||||
import org.hibernate.envers.revisioninfo.RevisionInfoNumberReader;
|
||||
import org.hibernate.envers.revisioninfo.RevisionInfoQueryCreator;
|
||||
import org.hibernate.envers.tools.MutableBoolean;
|
||||
import org.hibernate.mapping.PersistentClass;
|
||||
import org.hibernate.type.LongType;
|
||||
|
@ -101,7 +106,7 @@ public class RevisionInfoConfiguration {
|
|||
}
|
||||
|
||||
/**
|
||||
* Generates mapping that represents a set of strings.<br />
|
||||
* Generates mapping that represents a set of primitive types.<br />
|
||||
* <code>
|
||||
* <set name="propertyName" table="joinTableName" cascade="persist, delete" lazy="false" fetch="join"><br />
|
||||
* <key column="joinTablePrimaryKeyColumnName" /><br />
|
||||
|
@ -209,7 +214,7 @@ public class RevisionInfoConfiguration {
|
|||
modifiedEntityTypesData = new PropertyData(property.getName(), property.getName(), accessType, null);
|
||||
modifiedEntityTypesFound.set();
|
||||
} else {
|
||||
throw new MappingException("The field annotated with @ModifiedEntityTypes must be of type Set<String>.");
|
||||
throw new MappingException("The field annotated with @ModifiedEntityTypes must be of Set<String> type.");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -24,7 +24,6 @@
|
|||
package org.hibernate.envers.query;
|
||||
import static org.hibernate.envers.tools.ArgumentsTools.checkNotNull;
|
||||
import static org.hibernate.envers.tools.ArgumentsTools.checkPositive;
|
||||
|
||||
import org.hibernate.envers.configuration.AuditConfiguration;
|
||||
import org.hibernate.envers.query.impl.EntitiesModifiedAtRevisionQuery;
|
||||
import org.hibernate.envers.query.impl.EntitiesAtRevisionQuery;
|
||||
|
|
|
@ -14,7 +14,7 @@ import java.util.HashSet;
|
|||
import java.util.Set;
|
||||
|
||||
/**
|
||||
* Automatically adds entity class names that have been changed during current revision to revision entity.
|
||||
* Automatically adds entity class names, that have been changed during current revision, to revision entity.
|
||||
* @see ModifiedEntityTypes
|
||||
* @see DefaultTrackingModifiedTypesRevisionEntity
|
||||
* @author Lukasz Antoniak (lukasz dot antoniak at gmail dot com)
|
||||
|
|
|
@ -23,8 +23,6 @@
|
|||
*/
|
||||
package org.hibernate.envers.synchronization.work;
|
||||
import java.io.Serializable;
|
||||
import java.util.Arrays;
|
||||
import java.util.Collections;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
import org.hibernate.engine.SessionImplementor;
|
||||
|
|
Loading…
Reference in New Issue