All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.hibernate.envers.strategy.ValidityAuditStrategy Maven / Gradle / Ivy

There is a newer version: 7.0.0.Beta2
Show newest version
/*
 * 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 .
 */
package org.hibernate.envers.strategy;

/**
 * Audit strategy which persists and retrieves audit information using a validity algorithm, based on the
 * start-revision and end-revision of a row in the audit tables.
 * 

This algorithm works as follows: *

    *
  • For a new row that is persisted in an audit table, only the start-revision column of that row is set
  • *
  • At the same time the end-revision field of the previous audit row is set to this revision
  • *
  • Queries are retrieved using 'between start and end revision', instead of a subquery.
  • *
*

* This has a few important consequences that need to be judged against against each other: *

    *
  • Persisting audit information is a bit slower, because an extra row is updated
  • *
  • Retrieving audit information is a lot faster
  • *
* * @deprecated use {@link org.hibernate.envers.strategy.internal.ValidityAuditStrategy} instead. * * @author Stephanie Pau * @author Adam Warski (adam at warski dot org) * @author Lukasz Antoniak (lukasz dot antoniak at gmail dot com) * @author Chris Cranford */ @Deprecated(since = "5.4") public class ValidityAuditStrategy extends org.hibernate.envers.strategy.internal.ValidityAuditStrategy { }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy