Jo4neo’s “get most recent” feature

January 10th, 2010 § 2

“show the latest ….” is a common prefix to user stories these days.  Others have noted the same and given this symptom a moniker; ”The real time web“.  Typically we just throw things into a table with an indexed timestamp column and query accordingly.

In jo4neo, finding the most recent additions requires two simple steps:

  1. annotation your type with @neo(recency=true)
  2. use the ObjectGraph.getMostRecent() method to retrieve the latest inserts.

In this small example, we’re indicating to jo4neo that we’d like it to remember our “Post” inserts in most recent order. » Read the rest of this entry «

Where Am I?

You are currently browsing entries tagged with stack at The Web Semantic.