Is there a way to add a single criteria on a session factory(configuration) level wich will apply to all entites retreived with a Session ? We have a requirement to not delete any rows from our database but "mark" deleted entities as such so that they will not participate in any further operations.
I know that we can just retrive all entites through a common interface (e.g. a common base Dao object), but the approach with global filtering would be less error-prone as it doesn't require the knowledge of using this common interface.