this.mode = mode;
this.binder = binder;
}
@Override protected T wrapResultSet(ResultSet resultSet) {
Row row = resultSet.one();
if (LOGGER.isTraceEnabled()) {
LOGGER.trace("got {} row for {} modify {}", row != null ? "1" : "no", mode, entity.type);
}
if (tracer != null) {
tracer.onModifyWrapResultSet(persistenceSession, entity, mode, resultSet);
}
if (row != null) {
int idx = row.getColumnDefinitions().getIndexOf("[applied]");
if (idx != -1 && !row.getBool(idx)) {
throw new CasNotAppliedException(entity, instance, mode, row);
}
}
persistenceSession.modified(binder, mode, entity, instance);