Our great sponsors
-
spring-boot-value-objects-example
An example of implementing value objects and domain primitives in Spring Boot application
-
libphonenumber
Google's common Java, C++ and JavaScript library for parsing, formatting, and validating international phone numbers.
-
InfluxDB
Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.
-
hypersistence-utils
The Hypersistence Utils library (previously known as Hibernate Types) gives you Spring and Hibernate utilities that can help you get the most out of your data access layer.
I took code examples from this repository. You can clone it to see the entire project in action.
I'm using Google Libphonenumber library to validate the input.
Unfortunately, you cannot smoothly wrap the sequence-based IDs with value objects. There are solutions, but they are rather cumbersome. I left the proposal to the Hibernate types project of adding support to this feature. You’ve already seen the benefits of user-defined types. So, you can rate up my issue to make it more popular.