You'll find the CMP2.0 docs on the "Documentation link"
JBossQL lets you use Order By, the type mapping can
be configured. If the global config is incorrect, just change it
for that field.
Would this be the appropriate xdoclet code then:
* @ejb:finder signature="ConsolidatedMetReadingBean findLatestInBin(java.util.Date binDate)"
* query="SELECT DISTINCT OBJECT(c) FROM ConsolidatedMetReadingBean AS c WHERE c.BinID = binDate LIMIT 1 ORDER BY IssuanceTime"
Here, IssuanceTime actually describes the record, and BinID is a Date signifying the start-time of a 15 minute interval (say 10:15 or 12:30) for which that record belongs. (So, all records released between 10:15:00:00 and 10:29:59:99 would belong to the 10:15 "Bin")
The query would retrieve the latest ConsolidatedMetReading (based on IssuanceTime) from all ConsolidatedMetReadings with that same BinID.