@Override
    public void save(Visit visit) {
        if (visit.isNew()) {
            Number newKey = this.insertVisit.executeAndReturnKey(
                createVisitParameterSource(visit));
            visit.setId(newKey.intValue());
        } else {
            throw new UnsupportedOperationException("Visit update not supported");
        }
    }
A simple JDBC-based implementation of the {@link VisitRepository} interface.

@author Ken Krebs
@author Juergen Hoeller
@author Rob Harrop
@author Sam Brannen
@author Thomas Risberg
@author Mark Fisher
@author Michael Isvy
src/main/java/org/springframework/samples/petclinic/repository/jdbc/JdbcVisitRepositoryImpl.java