This may be a stupid question, but I have to ask:
How to check if attempt has been made to fetch entity from database, but was not found?
Background:
I have this helper class which lets users know what actions they can take, but requires that an object be passed into it.
I want to check if an attempt has been made to get that entity from the database.
if it is null, then users can go ahead, but if not I would like to make more checks
However if no attempt has been made to fetch the entity from the database, I would like to throw an exception.