* @return Returns the last recorded QTIResultSet
*/
public QTIResultSet getLastResultSet(Identity identity, long olatResource, String olatResourceDetail) {
QTIResultSet returnQTIResultSet=null;
DB persister = DBFactory.getInstance();
List resultSetList = persister.find("from q in class org.olat.ims.qti.QTIResultSet where "
+ "q.identity = ? and q.olatResource = ? and q.olatResourceDetail = ? order by q.creationDate desc", new Object[]{identity.getKey(), new Long(olatResource), new String(olatResourceDetail)},
new Type[]{Hibernate.LONG, Hibernate.LONG, Hibernate.STRING});
Iterator resultSetIterator = resultSetList.iterator();
while(resultSetIterator.hasNext()) {
returnQTIResultSet = (QTIResultSet)resultSetIterator.next();