docs: diagrams for unit of work, update method, and value object

This commit is contained in:
Ilkka Seppälä
2025-04-12 09:49:08 +03:00
parent 6195d5e1e8
commit 81ecb5638d
6 changed files with 12 additions and 0 deletions
+4
View File
@@ -43,6 +43,10 @@ Wikipedia says
> In computer science, a value object is a small object that represents a simple entity whose equality is not based on identity: i.e. two value objects are equal when they have the same value, not necessarily being the same object.
Flowchart
![Value Object Pattern Flowchart](./etc/value-object-flowchart.png)
## Programmatic Example of Value Object Pattern in Java
There is a class for hero statistics in a role-playing game. The statistics contain attributes such as strength, intelligence, and luck. The statistics of different heroes should be equal when all the attributes are equal.
Binary file not shown.

After

Width:  |  Height:  |  Size: 64 KiB