Well I assume you are going to stuck the data into an object or a bunch of objects whether it been through an ORM or just straight
JDBC calls. Stick the object[s] in a persistent state (Application for a web app where the query is the same for all users, Session per user cache, a swing app is naturally persistent if the object remains in scope) with a timestamp and check the timestamp everytime. What more is there to know?