Java Updating Model values

The flow we were trying for was a Java application watching for a choice to be executed on a contract. Inside that choice, 3 large data sets are passed as arguments. That data is taken and outside processing happens on it and values are updated, and then those same 3 large data sets get passed into a second choice to be updated on the contract. My problem is that the java generated classes have all the fields marked as “final” so I can’t update any of them. What is the typical way to handle this type of scenario? Thanks.

You can create a new object with the fields updated to reflect the change you want.

Yeah I should of said I was hoping to not have to do that because the data collections are like 20 layers deep and 500 fields hahaha. I think the model of passing everything back just isn’t going to work we will need to use a much smaller data set with just the fields that are modified. Thanks for the quick response.