ObjectAdapter restoredValue;
final Class<?> correspondingClass = field.getSpecification().getCorrespondingClass();
if (correspondingClass == TimeStamp.class) {
final java.sql.Timestamp o = (java.sql.Timestamp) results.getObject(columnName);
final TimeStamp timeValue = new TimeStamp(o.getTime());
restoredValue = IsisContext.getPersistenceSession().getAdapterManager().adapterFor(timeValue);
} else {
throw new PersistFailedException("Unhandled time type: " + correspondingClass.getCanonicalName());
}
return restoredValue;