directoryResult = getDirectoryById(directory.getId(), false);
if (conn != null) {
if (directoryResult == null
|| !directoryResult.getTimestamp().equals(directory.getTimestamp())) {
conn.rollback();
throw new DirectoryOutOfSyncException();
}
preStmt = conn.prepareStatement(sql);
preStmt.setObject(1, directory.getId(), Types.INTEGER);
preStmt.setObject(2, directory.getTimestamp(), Types.TIMESTAMP);