HHH-5580 - Cleanup

This commit is contained in:
Lukasz Antoniak 2011-05-21 13:35:36 +02:00
parent c2e53061f2
commit e558538ca1
6 changed files with 13 additions and 15 deletions

View File

@ -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 + ")";
}
}

View File

@ -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)
*/

View File

@ -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>
* &lt;set name="propertyName" table="joinTableName" cascade="persist, delete" lazy="false" fetch="join"&gt;<br />
* &nbsp;&nbsp;&nbsp;&lt;key column="joinTablePrimaryKeyColumnName" /&gt;<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.");
}
}
}

View File

@ -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;

View File

@ -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)

View File

@ -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;