Add helpers methods for Jasper reports
JasperStudio is not very helpful in navigating the object model.
We need to help users conveniently fetch data with new helper methods. These helper methods are not getters, they follow reportXxxxYyyyy
notation.
OrderRequest
helpers
For the documentation generated of an order, the country of the cooperator is requested.
Add a helper to the OrderRequest
get the country code of :
- final_recipient_cooperator:
OrderRequest#reportFinalRecipientCountryCode()
- ship_to_cooperator:
OrderRequest#reportShipToCountryCode() { return this.getShipToCooperator().getCountryCode() }
- requestor_cooperator:
OrderRequest#reportRequestorCountryCode()
- .... @jalarcon will define more
OrderRequestItem
helpers
OrderRequestItem#reportAccessionNumber() { return getInventory().getAccession().getAccessionNumber() }
OrderRequestItem#reportAccessionName() { return getInventory().getAccession().getPreferredName() }
OrderRequestItem#reportAccessionCollectCountryCode() { return getInventory().getAccession().getCollectingSource().getCountryCode() }
OrderRequestItem#reportSourceInventoryNumber() { return getInventory().getInventoryNumber() }
OrderRequestItem#reportWithdrawnInventoryNumber() { return getWithdrawnInventory().getInventoryNumber() }
- .... @jalarcon will define more
The diagram can help to figure out the relationships: