Hi Matt,
Check out the new Help topic "Customizing Standard Hierarchal Queries" in the Query Definition area of the Sourcing 9.0 Help.
There are instructions in this Help topic that explain how to customize the query's java procedure behavior using an XML-formatted string in the Query String of a duplicated Query Definition.
Regards,
Ed