Open 01es opened 9 years ago
The graph traversal algorithm implementation for deep equality should explore the interable (java.lang.Iterable
) and streaming (java.util.stream.Stream
) concepts. The rational for this is to be able to use Streaming API for analysing inequality reasons (for example, find the first two properties that do not match, or find whether inequality is caused by a property with certain meta-data). Streaming provides a way to achieve these results in a lazy and declarative manner.
Sometimes it becomes necessary to check if the two entity instances are not just equal from the perspective of business key, but are actually identical -- have equal values for all properties together with properties of those properties etc.
Need to extend class
AbstractEntity
with methoddeepEquals
that would use DFS or BFS algorithm for deep comparison of entity instances. The implementation should take into account proxy values.