Example usage for org.springframework.data.envers.repository.support EnversRevisionRepositoryImpl EnversRevisionRepositoryImpl

List of usage examples for org.springframework.data.envers.repository.support EnversRevisionRepositoryImpl EnversRevisionRepositoryImpl

Introduction

In this page you can find the example usage for org.springframework.data.envers.repository.support EnversRevisionRepositoryImpl EnversRevisionRepositoryImpl.

Prototype

public EnversRevisionRepositoryImpl(JpaEntityInformation<T, ?> entityInformation,
        RevisionEntityInformation revisionEntityInformation, EntityManager entityManager) 

Source Link

Document

Creates a new EnversRevisionRepositoryImpl using the given JpaEntityInformation , RevisionEntityInformation and EntityManager .

Usage

From source file:org.agatom.springatom.data.hades.repo.factory.NVersionedRepositoryImpl.java

/**
 * <p>Constructor for SRepositoryImpl.</p>
 *
 * @param entityInformation         a {@link org.springframework.data.jpa.repository.support.JpaEntityInformation} object.
 * @param revisionEntityInformation a {@link org.springframework.data.repository.history.support.RevisionEntityInformation} object.
 * @param entityManager             a {@link javax.persistence.EntityManager} object.
 *//*from   w  w w .ja  va 2  s. c  o m*/
public NVersionedRepositoryImpl(final JpaEntityInformation<T, Long> entityInformation,
        final RevisionEntityInformation revisionEntityInformation, final EntityManager entityManager) {
    super(entityInformation, entityManager);
    Preconditions.checkArgument(revisionEntityInformation != null, ERROR_MESSAGE_REI);
    this.revisionEntityInformation = revisionEntityInformation;
    this.repository = new EnversRevisionRepositoryImpl<>(entityInformation, revisionEntityInformation,
            entityManager);
    if (LOGGER.isTraceEnabled()) {
        LOGGER.trace(String.format("Created %s for arguments=[em=%s,ei=%s,rei=%s]",
                NVersionedRepositoryImpl.class.getSimpleName(), entityManager, entityInformation,
                revisionEntityInformation));
    }
}