The persistence-api is the parent project that provides api module projects for implement jpa projects. It tends to be easy to understand and uses different standards like JPA and or-mapper framework hibernate and spring for dependency injection.
Here is a simple description of the important module projects:
The entities-api module project provides several interfaces like Versionable, Activatable, Validatable that can be implemented from entity or domain classes
The base-entities module project provides abstract entity classes like versionable, activatable, validatable and other useful base entity classes.
The business-api module project provides business intefaces and abstract classes for execute crud processes.
The data-api module project provides generic repository intefaces.
- contains attribute converter classes for the new java 8 java.time package.
The data-initialization module project provides only one abstract class AbstractDatabaseInitialization that provides callback methods for initialization of a database. The callback methods can be overwritten to provide custom behavior if needed.
The data-usertype module project provides specific usertype classes.
The domain-api module project provides generic base domain classes and service intefaces.
The domain-mapper module project provides generic mapper classes that use the dozzer framework for map entity classes to domain specific classes.
The domain-api module project provides rest intefaces and abstract classes for execute crud processes.
The rest-client module project provides an abstract rest client for test rest services. It uses the cxf framework from apache.
The source code comes under the liberal Apache License V2.0, making persistence-api great for all types of back end applications.
Maven dependency is now on sonatype. Check out sonatype repository for latest snapshots and releases.
Add the following maven dependencies to your project pom.xml
if you want to import the core functionality:
You can first define the version properties:
<properties>
...
<!-- PERSISTENCE-API version -->
<persistence-api.version>6.6</persistence-api.version>
<base-entities.version>${persistence-api.version}</base-entities.version>
<base-service-api.version>${persistence-api.version}</base-service-api.version>
<business-api.version>${persistence-api.version}</business-api.version>
<data-api.version>${persistence-api.version}</data-api.version>
<data-initialization.version>${persistence-api.version}</data-initialization.version>
<data-usertype.version>${persistence-api.version}</data-usertype.version>
<domain-api.version>${persistence-api.version}</domain-api.version>
<domain-mapper.version>${persistence-api.version}</domain-mapper.version>
<rest-api.version>${persistence-api.version}</rest-api.version>
<rest-client.version>${persistence-api.version}</rest-client.version>
...
</properties>
Add the following maven dependency to your project pom.xml
if you want to import the functionality of base-entities:
<dependencies>
...
<!-- BASE-ENTITIES DEPENDENCY -->
<dependency>
<groupId>de.alpharogroup</groupId>
<artifactId>base-entities</artifactId>
<version>${base-entities.version}</version>
</dependency>
...
</dependencies>
Add the following maven dependency to your project pom.xml
if you want to import the functionality of business-api:
<dependencies>
...
<!-- BUSINESS-API DEPENDENCY -->
<dependency>
<groupId>de.alpharogroup</groupId>
<artifactId>business-api</artifactId>
<version>${business-api.version}</version>
</dependency>
...
</dependencies>
Add the following maven dependency to your project pom.xml
if you want to import the functionality of base-service-api:
<dependencies>
...
<!-- BASE-SERVICE-API DEPENDENCY -->
<dependency>
<groupId>de.alpharogroup</groupId>
<artifactId>base-service-api</artifactId>
<version>${base-service-api.version}</version>
</dependency>
...
</dependencies>
Add the following maven dependency to your project pom.xml
if you want to import the functionality of data-api:
<dependencies>
...
<!-- DATA-API DEPENDENCY -->
<dependency>
<groupId>de.alpharogroup</groupId>
<artifactId>data-api</artifactId>
<version>${data-api.version}</version>
</dependency>
...
</dependencies>
Add the following maven dependency to your project pom.xml
if you want to import the functionality of data-initialization:
<dependencies>
...
<!-- DATA-INITIALIZATION DEPENDENCY -->
<dependency>
<groupId>de.alpharogroup</groupId>
<artifactId>data-initialization</artifactId>
<version>${data-initialization.version}</version>
</dependency>
...
</dependencies>
Add the following maven dependency to your project pom.xml
if you want to import the functionality of data-usertype:
<dependencies>
...
<!-- DATA-USERTYPE DEPENDENCY -->
<dependency>
<groupId>de.alpharogroup</groupId>
<artifactId>data-usertype</artifactId>
<version>${data-usertype.version}</version>
</dependency>
...
</dependencies>
Add the following maven dependency to your project pom.xml
if you want to import the functionality of domain-api:
<dependencies>
...
<!-- DOMAIN-API DEPENDENCY -->
<dependency>
<groupId>de.alpharogroup</groupId>
<artifactId>domain-api</artifactId>
<version>${domain-api.version}</version>
</dependency>
...
</dependencies>
Add the following maven dependency to your project pom.xml
if you want to import the functionality of domain-mapper:
<dependencies>
...
<!-- DOMAIN-MAPPER DEPENDENCY -->
<dependency>
<groupId>de.alpharogroup</groupId>
<artifactId>domain-mapper</artifactId>
<version>${domain-mapper.version}</version>
</dependency>
...
</dependencies>
Add the following maven dependency to your project pom.xml
if you want to import the functionality of rest-api:
<dependencies>
...
<!-- REST-API DEPENDENCY -->
<dependency>
<groupId>de.alpharogroup</groupId>
<artifactId>rest-api</artifactId>
<version>${rest-api.version}</version>
</dependency>
...
</dependencies>
Add the following maven dependency to your project pom.xml
if you want to import the functionality of rest-client:
<dependencies>
...
<!-- REST-CLIENT DEPENDENCY -->
<dependency>
<groupId>de.alpharogroup</groupId>
<artifactId>rest-client</artifactId>
<version>${rest-client.version}</version>
</dependency>
...
</dependencies>
The source code for persistence-api are on GitHub. Please feel free to fork and send pull requests!
Create your own fork of lightblueseas/persistence-api/fork
To share your changes, submit a pull request.
Don't forget to add new units tests on your changes.
Do not hesitate to contact the persistence-api developers with your questions, concerns, comments, bug reports, or feature requests.
- Feature requests, questions and bug reports can be reported at the issues page.
No animals were harmed in the making of this library.
If you like this library, please consider a donation through paypal:
or over bitcoin or bitcoin-cash with:
1Jzso5h7U82QCNmgxxSCya1yUK7UVcSXsW
or over ether with:
0xaB6EaE10F352268B0CA672Dd6e999C86344D49D8
Travis CI |
---|
Many thanks to Travis CI for providing a free continuous integration service for open source projects. |
Here is a list of awesome projects for persistence:
- mardao Mardao Architect's Java DAO generator.
- spring-data Simplifies the development of creating a JPA-based data access layer.