public Date getRevisionDate(Comparable lastChanged) throws WGAPIException, WGWrongRevisionException {
if (_ddlVersion >= WGDatabase.CSVERSION_WGA5) {
if (!(lastChanged instanceof Long)) {
throw new WGWrongRevisionException(Long.class);
}
LogEntry entry = (LogEntry) getSession().get(LogEntry.class, (Long) lastChanged);
if (entry != null) {
return entry.getLogtime();
}
else {
return null;
}
}
else {
try {
return (Date) lastChanged;
}
catch (ClassCastException e) {
throw new WGWrongRevisionException(Date.class);
}
}
}