https://github.com/jwcarman/jpa-utils
A collection of Jakarta Persistence API utilities
https://github.com/jwcarman/jpa-utils
jakarta-persistence javaee jpa
Last synced: about 2 months ago
JSON representation
A collection of Jakarta Persistence API utilities
- Host: GitHub
- URL: https://github.com/jwcarman/jpa-utils
- Owner: jwcarman
- License: apache-2.0
- Created: 2025-02-14T03:25:13.000Z (4 months ago)
- Default Branch: main
- Last Pushed: 2025-02-24T23:25:16.000Z (3 months ago)
- Last Synced: 2025-02-24T23:30:45.737Z (3 months ago)
- Topics: jakarta-persistence, javaee, jpa
- Language: Java
- Homepage:
- Size: 21.5 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# JPA Utilities
[](https://sonarcloud.io/summary/new_code?id=jwcarman_jpa-utils)
[](https://sonarcloud.io/summary/new_code?id=jwcarman_jpa-utils)
[](https://sonarcloud.io/summary/new_code?id=jwcarman_jpa-utils)
[](https://sonarcloud.io/summary/new_code?id=jwcarman_jpa-utils)
[](https://sonarcloud.io/summary/new_code?id=jwcarman_jpa-utils)
[](https://sonarcloud.io/summary/new_code?id=jwcarman_jpa-utils)
A collection of utilities I've found useful when writing applications and services using
the [Jakarta Persistence API](https://jakarta.ee/specifications/persistence/).# Base Entity
The `BaseEntity` class provides a base implementation of the `Entity` interface, which includes:
- A stable, UUID-based identifier, generated at construction time using the [Java Uuid Generator](https://github.com/cowtowncoder/java-uuid-generator) library's time-based epoch generator (version 7)
- A JPA `@Version` property for optimistic locking (also helps the JPA provider understand if the entity is new or not when persisting)