What if you need to verify – if row with given key exists in fetched rowset? This could be useful while implementing validation logic. ADF BC API method findByKey – will trigger SQL call and fetch row from DB, if row with given key doesn’t exist in fetched rowset. Luckily there is ADF BC API method called findInCacheByKey, this method only checks for row in fetched rowset, without going to DB – very convenient in certain situations, when you actually don’t want to bring record from DB, if it wasn’t fetched.
Now if we call custom method, where findInCacheByKey is invoked twice – you will see different results. First call is using key from fetched rowset – this call will find a row. Second call is using key, which doesn’t belong to the fetched rowset – row is not in cache and call will return zero rows: Read the complete article here.
For regular information become a member in the WebLogic Partner Community please visit: http://www.oracle.com/partners/goto/wls-emea ( OPN account required). If you need support with your account please contact the Oracle Partner Business Center.