@Override
    public void save(Pet pet) {
        if (pet.isNew()) {
            Number newKey = this.insertPet.executeAndReturnKey(
                createPetParameterSource(pet));
            pet.setId(newKey.intValue());
        } else {
            this.jdbcClient
                .sql("""
                    UPDATE pets
                    SET name=:name, birth_date=:birth_date, type_id=:type_id, owner_id=:owner_id
                    WHERE id=:id
                    """)
                .paramSource(createPetParameterSource(pet))
                .update();
        }
    }
@author Ken Krebs
@author Juergen Hoeller
@author Rob Harrop
@author Sam Brannen
@author Thomas Risberg
@author Mark Fisher
@author Antoine Rey
src/main/java/org/springframework/samples/petclinic/repository/jdbc/JdbcPetRepositoryImpl.java