Does findByKey help for transient VO.
That is interesting. Came across this in one of our team tech presentations.
let me jott down the points ..
1.TransientVO is a type of viewobject where rows are supposed to be populated programmatically unlike entity or query based VO where rows are populated from entity cache or directly from db.
2.Now, per my last post, we already know that findBykey() is actually meant for entity object based view objects where the rows from entity cache can be fetched more efficiently using key columns which are indexed. Now, if we enforce the findByKey() to find rows based on key column in a transient VO then it unnecessarily performs some steps like checking if it is an entity based VO, checking for key columns, checking for indexes etc, which is of no use.
Now, since all the rows are already in transient VO cache, so we can directly use getFilteredRows() or getRow(key). Thus, in this case findByKey() won’t be good to use.



