"Why can't I find the post-state of a View Row? Shouldn't there be a simple API for this?"
We don't expose getPostState() at the VO Row level because in general it's not well-defined.
If you have a VO with three entity usages, it is possible for multiple usages to be in multiple post-states. For example, you might have a view object row showing information from an Order, from a Customer who placed the order, and from an Agent assigned to review the order. If you've modified Customer attributes in the row, added for the first time Agent information to the row, and left the Order information untouched, you would have:
It's hard to say in this case what the status of the OrderSummaryView row is. It's kind of STATUS_MIXED.
However, by overridding the ViewRowImpl class for this OrderSummary view object, you could expose a custom method on the row level that indicates what makes sense as a ViewRow status for your application. Or, you could subclass the oracle.jbo.server.ViewRowImpl class with a clever overridden implementation of a row state method done in a generic way, and then choose when to expose it on appropriate view object's that require it in your application.
11:26:38 AM
|