datawave
datawave copied to clipboard
Update contract for Projection classes
The Projection, KeyProjection, and DocumentProjection classes all rely on thrown exceptions to enforce immutability. One suggestion while working https://github.com/NationalSecurityAgency/datawave/pull/1481 was to remove the exceptions, force the collections to be immutable, and pass in any include/exclude fields as constructor args.
Decide on a contract and implement it.
This seems like a case where if we can avoid excessive exceptions, then why not? Passing them in as constructor args is straightforward, and if need be, it would be simple enough to create builder classes for each projection that would allow for easy, fluent construction.
Found ticket, working through to make any remaining changes.