private MapSqlParameterSource createPetParameterSource(Pet pet) {
        return new MapSqlParameterSource()
            .addValue("id", pet.getId())
            .addValue("name", pet.getName())
            .addValue("birth_date", pet.getBirthDate())
            .addValue("type_id", pet.getType().getId())
            .addValue("owner_id", pet.getOwner().getId());
    }
Creates a {@link MapSqlParameterSource} based on data values from the supplied {@link Pet} instance.
src/main/java/org/springframework/samples/petclinic/repository/jdbc/JdbcPetRepositoryImpl.java