HHH-5580: some documentation fixes
This commit is contained in:
parent
ae7b95c876
commit
789bf60427
|
@ -16,8 +16,7 @@
|
|||
which can be used to identify groups of changes (much like a change set in source control). As the revisions
|
||||
are global, having a revision number, you can query for various entities at that revision, retrieving a
|
||||
(partial) view of the database at that revision. You can find a revision number having a date, and the other
|
||||
way round, you can get the date at which a revision was committed. Since version 4.0, Envers enables you
|
||||
to retrieve all changes performed in a certain revision.
|
||||
way round, you can get the date at which a revision was committed.
|
||||
</para>
|
||||
</preface>
|
||||
|
||||
|
@ -258,13 +257,24 @@
|
|||
identifier (foreign key to <literal>REVINFO</literal> table) and a string value. This
|
||||
feature shall be used when entity name can be clearly identified by Java class type. Otherwise
|
||||
extend <interfacename>org.hibernate.envers.EntityTrackingRevisionListener</interfacename>
|
||||
interface. For more information refer to <xref linkend="envers-tracking-modified-entities-reventity"/>
|
||||
interface. For more information refer to <xref linkend="envers-tracking-modified-entities-revchanges"/>
|
||||
and <xref linkend="envers-tracking-modified-entities-queries"/>.
|
||||
</entry>
|
||||
</row>
|
||||
</tbody>
|
||||
</tgroup>
|
||||
</table>
|
||||
|
||||
<important>
|
||||
<para>
|
||||
The following configuration options have been added recently and should be regarded as experimental:
|
||||
<orderedlist>
|
||||
<listitem>
|
||||
org.hibernate.envers.track_entities_changed_in_revision
|
||||
</listitem>
|
||||
</orderedlist>
|
||||
</para>
|
||||
</important>
|
||||
</section>
|
||||
|
||||
<section>
|
||||
|
@ -465,7 +475,7 @@ public class ExampleListener implements RevisionListener {
|
|||
|
||||
</example>
|
||||
|
||||
<section id="envers-tracking-modified-entities-reventity">
|
||||
<section id="envers-tracking-modified-entities-revchanges">
|
||||
<title>Tracking entity classes modified in revision</title>
|
||||
<para>
|
||||
By default entity types that have been changed in each revision are not being tracked. This implies the
|
||||
|
@ -816,7 +826,7 @@ query.add(AuditEntity.relatedId("address").eq(relatedEntityId));]]></programlist
|
|||
</orderedlist>
|
||||
<para>
|
||||
Note that methods described above can be legally used only when default mechanism of
|
||||
tracking changed entity types is enabled (see <xref linkend="envers-tracking-modified-entities-reventity"/>).
|
||||
tracking changed entity types is enabled (see <xref linkend="envers-tracking-modified-entities-revchanges"/>).
|
||||
</para>
|
||||
</section>
|
||||
|
||||
|
|
|
@ -22,16 +22,18 @@
|
|||
* Boston, MA 02110-1301 USA
|
||||
*/
|
||||
package org.hibernate.envers;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
|
||||
import org.hibernate.HibernateException;
|
||||
import org.hibernate.envers.exception.AuditException;
|
||||
import org.hibernate.envers.exception.NotAuditedException;
|
||||
import org.hibernate.envers.exception.RevisionDoesNotExistException;
|
||||
import org.hibernate.envers.query.AuditQueryCreator;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
|
||||
/**
|
||||
* @author Adam Warski (adam at warski dot org)
|
||||
* @author Hernán Chanfreau
|
||||
|
@ -191,8 +193,7 @@ public interface AuditReader {
|
|||
/**
|
||||
* Checks if the entityName was configured to be audited.
|
||||
*
|
||||
* @param entityClass
|
||||
* EntityName of the entity asking for audit support.
|
||||
* @param entityName EntityName of the entity asking for audit support.
|
||||
* @return true if the entityName is audited.
|
||||
*/
|
||||
boolean isEntityNameAudited(String entityName);
|
||||
|
|
|
@ -22,14 +22,15 @@
|
|||
* Boston, MA 02110-1301 USA
|
||||
*/
|
||||
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;
|
||||
import org.hibernate.envers.query.impl.EntitiesModifiedAtRevisionQuery;
|
||||
import org.hibernate.envers.query.impl.RevisionsOfEntityQuery;
|
||||
import org.hibernate.envers.reader.AuditReaderImplementor;
|
||||
|
||||
import static org.hibernate.envers.tools.ArgumentsTools.*;
|
||||
|
||||
/**
|
||||
* @author Adam Warski (adam at warski dot org)
|
||||
* @author Hern<EFBFBD>n Chanfreau
|
||||
|
@ -76,8 +77,11 @@ public class AuditQueryCreator {
|
|||
}
|
||||
|
||||
/**
|
||||
* In comparison to {@link #forEntitiesAtRevision(Class, String, Number)} this query will return an empty
|
||||
* collection if an entity of a certain type has not been changed in a given revision.
|
||||
* Creates a query, which will return entities modified at the specified revision.
|
||||
*
|
||||
* In comparison, the {@link #forEntitiesAtRevision(Class, String, Number)} query takes into all entities
|
||||
* which were present at a given revision, even if they were not modified.
|
||||
*
|
||||
* @param c Class of the entities for which to query.
|
||||
* @param entityName Name of the entity (if can't be guessed basing on the {@code c}).
|
||||
* @param revision Revision number at which to execute the query.
|
||||
|
@ -92,8 +96,11 @@ public class AuditQueryCreator {
|
|||
}
|
||||
|
||||
/**
|
||||
* In comparison to {@link #forEntitiesAtRevision(Class, Number)} this query will return an empty
|
||||
* collection if an entity of a certain type has not been changed in a given revision.
|
||||
* Creates a query, which will return entities modified at the specified revision.
|
||||
*
|
||||
* In comparison, the {@link #forEntitiesAtRevision(Class, String, Number)} query takes into all entities
|
||||
* which were present at a given revision, even if they were not modified.
|
||||
*
|
||||
* @param c Class of the entities for which to query.
|
||||
* @param revision Revision number at which to execute the query.
|
||||
* @return A query for entities changed at a given revision, to which conditions can be added and which
|
||||
|
|
Loading…
Reference in New Issue