Giter Site home page Giter Site logo

andyglick / spring-data-envers Goto Github PK

View Code? Open in Web Editor NEW

This project forked from spring-projects/spring-data-envers

0.0 2.0 0.0 718 KB

Envers extension of the Spring Data JPA module

Home Page: http://projects.spring.io/spring-data-envers

Java 100.00%

spring-data-envers's Introduction

Spring Data Envers

This project is an extension of the Spring Data JPA project to allow access to entity revisions managed by Hibernate Envers. The sources mostly originate from a contribution of Philipp Hügelmeyer @hygl.

The core feature of the module consists of an implementation of the RevisionRepository of Spring Data Commons.

public interface RevisionRepository<T, ID extends Serializable, N extends Number & Comparable<N>> {

	Revision<N, T> findLastChangeRevision(ID id);

	Revisions<N, T> findRevisions(ID id);

	Page<Revision<N, T>> findRevisions(ID id, Pageable pageable);
}

You can pull in this functionality to your repositories by simply additionally extending the interface just mentioned:

interface PersonRepository extends RevisionRepository<Person, Long, Integer>, CrudRepository<Person, Long> {

  // Your query methods go here
}

To successfully activate the Spring Data Envers repository factory use the Spring Data JPA repositories namespace element's factory-class attribute:

<jpa:repositories base-package="com.acme.repositories"
                  factory-class="….EnversRevisionRepositoryFactoryBean" />

Contributing to the project

If you're an Eclipse user make sure you activate automatic application of the formatter (located at etc/eclipse-formatter.xml) and activate automatic formatting and organizing imports on save.

spring-data-envers's People

Contributors

odrotbohm avatar spring-builds avatar mp911de avatar hygl avatar jmporterog avatar nfrankel avatar

Watchers

Andy Glick avatar James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.