In this example, you will see how to use a public method that works on or with the current WorkQuery that you pass into the method.
Please note, this first method is meant to work ON the WorkQuery passed in which means any fields or records modified will be reflected in the output of this public method. The second method is meant to work WITH the WorkQuery provided to the method.
The purpose or use case of these public methods is when you have similar bunched logic in multiple places in your application, you may want to clean this up and abstract some of the logic out which not only improves the readability of your procedure but provides a more modular approach more in line with modern application building as well as reusability. Different use cases will be present for both of the methods provided.