Add DataObject default methods (MDSAL-470)

[MDSAL-149] Binding DTOs: improve equals() implementation Created: 05/Apr/16  Updated: 20/Jul/20  Resolved: 20/Jul/20

Status: Resolved
Project: mdsal
Component/s: Binding codegen
Affects Version/s: None
Fix Version/s: None

Type: Sub-task
Reporter: Martin Ciglan Assignee: Unassigned
Resolution: Duplicate Votes: 0
Labels: pt
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Operating System: All
Platform: All


Issue Links:
Duplicate
duplicates MDSAL-88 Binding DTOs: improve equals() implem... Resolved

 Description   

+++ This bug was initially created as a clone of MDSAL-88 +++

Our current equals() implementation visits each child node in alphabetical order. While this is correct, finding inequalities may take significant time, as we bore recursively into objects.

Since the order of comparison does not determine the result of equality comparison, we can speed up detecting degatives if we employ some smarts. Those smarts is that some types can be compared more quickly than others, simply because they are terminal nodes.

Teach the DTO generator code to recognize the types being compared and perform the following ordering:

1) numeric types (boolean, byte, short, int, long, biginteger, bigdecimal), identityrefs
2) string, binary, bits
3) instance identifier
4) all other (e.g. composite) types



 Comments   
Comment by Martin Ciglan [ 05/Apr/16 ]

this is rather binding spec. v2 design improvement than part of design itself and it can be fixed later

Comment by Robert Varga [ 16/Mar/19 ]

Binding V2 is going away in 4.0.0.

Comment by Robert Varga [ 20/Jul/20 ]

Duplicate of MDSAL-88.

Generated at Wed Feb 07 20:08:45 UTC 2024 using Jira 8.20.10#820010-sha1:ace47f9899e9ee25d7157d59aa17ab06aee30d3d.